home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FM Towns: Free Software Collection 11
/
FM Towns Free Software Collection 11.iso
/
fb386
/
tool
/
ress
/
ress.bas
< prev
next >
Wrap
BASIC Source File
|
1995-08-20
|
114KB
|
3,467 lines
100 '===========================================
110 '
120 ' RPG Engine Support System
130 ' RESS
140 ' Ver.0.91 #07
150 ' Copyright(c) 黒木謙治 (RoCky)
170 ' 公開2版
180 '
190 '===========================================
200 '###########################################
210 ' 1000番台~9000番台は個人拡張スペースです。
10000 '+--====================================--+
10010 '|○ RESSメインエンジン ○|
10020 '| [Sys_RESS] |
10030 '|○ RESS Ver.0.91#07 ○|
10040 '+--====================================--+
10050 *System_RESS
10060 def sprite 99,0
10070 randomize time
10080 gosub *Sys_StartMemory
10090 clear,,1024,fre(4)*0.8-300*1024,0,300*1024
10100 defint A-Z
10110 gosub *Sys_MemoryCheck
10120 RESSEND = 0
10130 on error goto *ERR_END
10170 while RESSEND = 0
10180 on error goto *ERR_PRINTEND
10190 gosub *Sys_BaseSetup
10200 gosub *Sys_MemorySet
10210 gosub *Sys_ConfigLoad
10220 gosub *Sys_CFGERR
10230 gosub *Debug_ModeSet
10240 gosub *Sys_ExMemorySet
10250 gosub *Sys_BgmSetLoad
10260 gosub *Sys_DataLoad
10270 gosub *Sys_WaitSet
10280 gosub *READ_SPRYSP
10300 gosub *Sys_ShowLogo
10310 gosub *INT_SCN
10320 gosub *SET_SPR_WEPON
10330 gosub *Sys_Startup
10340 gosub *Main_MapSetup
10350 gosub *Main_MapMain
10370 gosub *INT_SCN
10380 gosub *Debug_MemoryView
10390 if syscfg$(9) <> "" and syscfg$(9) <> "OFF" then run syscfg$(9)
10400 wend
10460 if val( syscfg$(5) ) = 1 then system
10470 end
10480 '
10490 '
11000 '+--===================================--+
11010 '|○スタートアップメニュー ○|
11020 '| [Sys_Startup] コンフィグ(28) |
11030 '+--===================================--+
11040 *Sys_Startup
11050 if RESSEND = 0 then
11060 on error goto *ERR_END
11070 def font "システム 12ドット"
11080 gosub *INT_SCN
11090 gosub *CG_OFF
11100 load@ sysf$ + syscfg$(28)
11110 SX =103 : SY = 27 : SYM$ = "システムメニュー♪" : gosub *WRT_SYM
11120 SX = 70 : SY = 81 : SYM$ = "このゲームを始める" : gosub *WRT_SYM
11130 SX = 70 : SY = 113 : SYM$ = "RPGデータを編集する" : gosub *WRT_SYM
11140 SX = 70 : SY = 145 : SYM$ = "操作方法の説明を見る" : gosub *WRT_SYM
11150 SX = 70 : SY = 177 : SYM$ = "RESSシステムを終了する" : gosub *WRT_SYM
11160 gosub *MBUF_IN
11170 line ( 0, 0) - (319,239),pset,0,bf
11180 gosub *CG_ON
11190 for I = 0 to 239 step 2
11200 put@a ( 0, 0+I) - (319, 0+I),GRP%,,,,, I *320
11210 put@a ( 0,239-I) - (319,239-I),GRP%,,,,,(239-I)*320
11220 wait 1
11230 next I
11240 gosub *INT_PAD
11250 CSL = 0
11260 PTSET = 0
11270 while PTSET = 0
11280 line ( 63,79+32*CSL) - (256,96+32*CSL),xor,1,bf
11290 PADSET = 3
11300 gosub *WAIT_PAD
11310 line ( 63,79+32*CSL) - (256,96+32*CSL),xor,1,bf
11320 if PD = 1 then CSL = CSL - 1 : if CSL < 0 then CSL = 3
11330 if PD = 5 then CSL = CSL + 1 : if CSL = 4 then CSL = 0
11340 if PT = 1 then on CSL+1 gosub *START,*EDIT_IN,*Sys_Manual_M,*ENDMNS
11350 wend
11360 for I = 0 to 40
11370 line ( I,0)-( I,255),pset,[ 0, 0,255-I*2]
11380 line (319-I,0)-(319-I,255),pset,[ 0, 0,255-I*2]
11390 next I
11400 for Y = 0 to 239
11410 line ( 41, Y) - (279, Y),pset,[ 0, 0, Y]
11430 next Y
11440 for I = 0 to 319 step 2
11450 line ( I, 0) - ( I,239),pset,0,bf
11460 line (319-I, 0) - (319-I,239),pset,0,bf
11470 next I
11480 on error goto *ERR_PRINTEND
11490 endif
11500 return
11510 '
11600 '/* ---<<ゲームスタート!!>>--- */
11610 *START
11620 PTSET = 1
11630 if DBM = 4 then DBM = 0
11640 SX = 26
11650 SY = 208
11660 SYM$ = "@ye@ft○ ゲームをスタートします ○@it"
11670 gosub *WRT_SYM
11680 return
11690 '
11700 '/* ---<<終わっちゃいます♪>>--- */
11710 *ENDMNS
11720 PTSET = 1
11730 RESSEND = 1
11740 SX = 26
11750 SY = 208
11760 SYM$ = "@ye@ft○ RPGシステム RESSを終了します ○@it"
11770 gosub *WRT_SYM
11780 return
11790 '
11800 '/* ---<< 編集モード移行 >>--- */
11810 *EDIT_IN
11820 if EDIT_ON = 7 then
11830 PTSET = 1
11840 DBM = 4
11850 else
11860 SX = 16
11870 SY = 208
11880 SYM$ = "@ye○ この機能は使えません ○@it"
11890 gosub *WRT_SYM
11900 endif
11910 return
11920 '
12000 '+--===================--+
12010 '|○ 基礎変数設定 ○|
12020 '|○ [Sys_BaseSetup] ○|
12030 '+--===================--+
12040 *Sys_BaseSetup
12050 if RESSEND = 0 then
12100 SVER$ = "RESS v0.91#07"
12110 MAPX_MAX = 5 : MAPY_MAX = 6
12120 VWMAPX = 16 : VWMAPY = 11
12130 FONTSIZE = 12
12140 PTN_MAX = 192
12150 NMPTN = 72
12160 HVPTN = 6 + NMPTN
12170 HDPTN = 6 + HVPTN
12180 EVPTN = 12 + HDPTN
12190 NIPTN = 96 + EVPTN
12200 BCHR_MAX = 7
12210 MCHR_MAX = 7
12220 ANMFLM_MAX = 24
12230 ANMSET_MAX = 24
12240 MCLINE_MAX = 16
12250 MCCMD_MAX = 72
12260 BMNCMD_MAX = 19
12270 FMNCMD_MAX = 19
12280 MAGIC_MAX = 19
12290 WCHR_MAX = 63
12300 ITEM_MAX = 10
12340 EVSET_MAX = 63
12350 SCPSET_MAX = 127
12360 STRYMAX = 300
12370 USRFLG_MAX = 500 ' --- Reserved ---
12380 ENDS = 0
12390 CHG = 1
12400 CHGX = 0
12410 CHGY = 0
12420 FILEN = 1
12430 MNSON = 0
12440 SCRN_MODE = 1 ' スキャンモード変更ルーチン用
12450 SCRN_X = 32
12460 PTNNUM = -1 ' 編集モード時パターン選択機能バッファ
12500 OLDPTN = -1
12510 TPSET = 0 ' クラス1バッファフラグ初期化
12520 GRPBFSET = 0 ' クラス2バッファフラグ初期化
12530 S! =0.75
12540 MJC = 7
12550 DEFSPR_MONS1 = 0
12560 DEFSPR_MONS2 = 0
12570 DEFSPR_MONS3 = 0
12580 EXCHRSET(1) = 0
12590 EXCHRSET(2) = 0
12600 ALMAPX = MAPX_MAX * VWMAPX
12610 ALMAPY = MAPY_MAX * VWMAPY
12620 if MSGW_SPC$ = "" then
12630 MSGW_SPC$ = "@wh- RPG System @grRESS@wh -@th"
12640 endif
12650 endif
12660 return
12670 '
13000 '+--===================================--+
13010 '|○ 環境変数宣言 ○|
13020 '|○ [Sys_MemorySet] [Sys_ExMemorySet] ○|
13030 '+--===================================--+
13040 *Sys_MemorySet
13050 if RESSEND = 0 then
13060 if MEMSET_A = 0 then
13100 dim SYSCFG$(100)
13110 dim MAP_DATA%(ALMAPX,ALMAPY)
13120 dim MAP_PTN%( 256 * (PTN_MAX+1) )
13130 dim TMPPTN%(256)
13140 dim TMP%(1023), TMM$(9)
13150 dim BGMN%(20) , CDTMP%(10)
13160 dim EVX(EVSET_MAX) , EVY(EVSET_MAX) , CMND$(EVSET_MAX)
13170 dim ITEM$( ITEM_MAX , 2 )
13200 dim BTLM_SUB$(MAGIC_MAX)
13210 dim BSMES$(20) , BSMSC%(20)
13220 dim BSWPN$(20) , BSWPP%(20) , BSEND$(20)
13230 dim STRYFLG% (STRYMAX)
13240 dim SCRPT$( SCPSET_MAX )
13250 dim SCPFLG%( SCPSET_MAX )
13260 dim MENUCMD%( BMNCMD_MAX , 1 )
13270 dim BTLMCMD%( FMNCMD_MAX , 1 ) ' 0=MACNO 1=FlagLnk
13280 dim MACSCP$( MCCMD_MAX , MCLINE_MAX )
13290 dim MACLINEMAX%( MCCMD_MAX )
13300 dim B_ITEM$(29)
13310 dim TEXTTMP$(21)
13320 dim AG_BF%( ANMSET_MAX )
13330 dim ANMG%( ANMSET_MAX , ANMFLM_MAX , 3 )
13340 ' 数,フレーム,( 0=SPR 1=X 2=Y 3=CHR )
13350 ' 0=PTN 1=CHR
13360 dim MCHR%( MCHR_MAX , 1 )
13370 dim BCHR%( BCHR_MAX , 1 )
13380 dim WPNCHR%( WCHR_MAX )
13390 dim DIV(12)
13430 dim DF(64) , CH(192,4) , PL(16) ' for YSP
13440 dim PTNBANK$ (10) , BACKBANK$(10)
13450 MEMSET_A = 1
13460 endif
13470 endif
13480 return
13490 '
13500 '/* ---<< グラフィック&サウンド配列設定 >>--- */
13510 *Sys_ExMemorySet
13520 if RESSEND = 0 then
13530 if MEMSET_E = 0 then
13540 dim GRP% (76800)
13550 dim MONSBF% ( 4096)
13560 dim BTLBACK%(11264) '77000 + 4096 + 9216 + 256 = 90568
13570 dim MESW% ( 256 )
13590 EXCLAS = 0
13600 if FREXCL => 1 then
13610 dim EXGBF%(80000) '( 9984 )→10000
13620 dim SND% (10000) '80000 + 10000 = 90256
13630 EXCLAS = 1
13640 if FREXCL => 2 then
13650 dim GRPBF% ( 80000 )
13660 dim EUPMEM%(EUPSIZE*1024)
13670 EXCLAS = 2
13700 endif
13710 endif
13750 MEMSET_E = 1
13760 endif
13770 endif
13780 return
13790 '
14000 '+--==================--+
14010 '|○ メインルーチン ○|
14020 '|○ ○|
14030 '+--==================--+
14100 *Main_MapSetup
14110 if RESSEND = 0 then
14120 gosub *INT_SFLG
14130 gosub *INT_SCN
14140 gosub *FAST_ON
14150 gosub *SPR_ON
14160 on error goto *ERR_END
14170 gosub *DRW_WAKU
14180 if syscfg$(9) = "OFF" or syscfg$(9) = "" then
14190 rem
14200 else
14210 SCPFILE$ = syscfg$(9)
14220 gosub *SCRPT_RUN
14230 endif
14240 if DBM = 4 then
14250 FILEN = 0
14260 DEMO = 0
14270 gosub *MainLOADNOTE
14280 gosub *LOADFILE
14290 MSG$ = "@gr--RESS編集機能動作中--@th"
14300 gosub *PUT_MES
14320 else
14330 gosub *FILELOAD_1
14340 endif
14350 gosub *FADE_DISPMAP
14360 if DBM = 0 and syscfg$(7) <> "" then
14370 MEST = 1
14380 MSG$ = syscfg$(7)
14390 gosub *PUT_MES
14400 MEST = 0
14410 endif
14420 MSG$ = ""
14430 gosub *PUT_MES
14440 gosub *FAST_OFF
14450 endif
14480 return
14490 '
14500 '/* ---<<マップ上移動ルーチン本体>>--- */
14510 *Main_MapMain
14520 if RESSEND = 0 then
14530 on error goto *ERR_END
14540 gosub *CHR_ON
14550 MVCHG = 1
14560 while ENDS = 0
14570 on int( (PD+1) / 2 ) gosub *S_UP,*S_RIGHT,*S_DOWN,*S_LEFT
14580 gosub *INP_PAD
14590 while PD = 0
14600 gosub *INP_PAD
14610 if PT <> 0 or ENDS <> 0 then PD = 99
14620 wend
14630 if DBM = 4 then
14640 put@a (299,170) - (314,185),MAP_PTN%,,,,,256*CHG
14650 if PT = 1 then gosub *PUTPTN
14660 if PT = 8 then gosub *CHGPTN
14670 endif
14680 if PT = 1 and DBM <> 4 then gosub *CHK_EVENT
14690 if PT = 2 and DBM <> 4 then gosub *SUB_MENU
14700 if PT = 2 and DBM = 4 then gosub *EX_MENU
14710 if PT = 8 and DBM <> 4 then gosub *ScanChg
14720 if PT = 10 then end
14730 if ( RND < BTLPST! ) and DBM <> 4 and PT <> 1 then gosub *BATTLE
14740 wend
14750 gosub *CHR_OFF
14800 if EXCLAS =>1 then gosub *FADE_5 else gosub *FADE_4
14810 gosub *FADE_1
14820 endif
14830 sprite off
14840 on error goto *ERR_PRINTEND
14850 return
14860 '
15000 '/* ---<<イベント起動>>--- */
15010 *CHK_EVENT
15020 if DBM <> 4 then
15030 gosub *FAST_ON
15040 for DP = 1 to AMC
15050 if SMAPX = EVX(DP) and SMAPY = EVY(DP) then
15060 ESUB$ = CMND$(DP)
15070 gosub *EVSUB
15080 endif
15090 next DP
15100 gosub *FAST_OFF
15110 endif
15120 gosub *INT_PAD
15130 return
15140 '
15200 ' Event SUB
15210 *EVSUB
15220 EVTMP$ = mid$(ESUB$,1,6)
15230 if EVTMP$ = "SCPRUN" then
15240 SCPFILE$ = mid$( ESUB$, 8 , 11 )
15250 gosub *SCRPT_RUN
15280 gosub *PUT_MES
15290 wait 20
15300 else if EVTMP$ <> "SCPRUN" then
15310 CMDL$ = ESUB$
15320 FLGON = 0
15330 gosub *SCP_MAIN
15340 endif
15350 return
15360 '
16000 '+---=========================---+
16010 '|○ マップデータローダー ○|
16020 '|○ [Main_ReadMap] [READ_MAP] ○|
16030 '+---=========================---+
16040 *Main_ReadMap
16050 *READ_MAP
16080 gosub *FAST_ON
16090 OLDPTN = PTNNUM
16100 if DBM = 4 or DBM = 1 then
16110 MSG$ = str$(ALMAPS) + "番のマップデータを読み込んでま~す♪@th"
16120 else
16130 MSG$ = "@wh--只今地図を探索しています♪--@th"
16140 endif
16150 gosub *PUT_MES
16190 FILE$ = stryf$ + "EMAP_" + mid$( str$(ALMAPS),2) + ".MTB"
16200 FLNO% = 2
16210 open FILE$ for input as #FLNO%
16220 'input#FLNO%,DUMMY$
16230 gosub *Main_MapData_Load
16240 gosub *Main_MapEVENT_Load
16260 gosub *Main_MapPTN_Load
16270 close #FLNO%
16280 CDNO = CDBG
16290 gosub *CDPLY
16300 gosub *FAST_OFF
16310 on error goto 0
16320 BKSET = 0
16330 return
16340 '
16400 '/* ---<<マップデータテーブル読み込み>>--- */
16410 *Main_MapData_Load
16420 input#FLNO%, CDBG , MAPX_MAX, MAPY_MAX
16430 input#FLNO%, MNSON, PTNNUM , BACKNO
16440 input#FLNO%, BTLPST!
16450 for I = 1 to 8
16460 input#FLNO%, MSNMD$(I), MSLVD(I), MSMXHPD(I)
16470 input#FLNO%, MSATPD(I), MSDFD(I), CLJD(I)
16480 input#FLNO%, MSEXPD(I), MSGLDD(I), MSTIFD$(I), MSSIZD(I)
16490 next I
16500 return
16510 '
16600 '/* ---<<イベント設定所読み込み>>--- */
16610 *Main_MapEVENT_Load
16620 input#FLNO%,AMC
16630 for I = 1 TO AMC
16640 input#FLNO%, EVX(I), EVY(I), CMND$(I)
16650 next I
16660 return
16670 '
16700 '/* ---<<マップパターンデータ読み込み>>--- */
16710 *Main_MapPTN_Load
16720 FILE$ = stryf$ + "EMAP_" + mid$ ( str$(ALMAPS),2 ) + ".BMD"
16730 load@ FILE$,MAP_DATA%
16740 ALMAPX = MAPX_MAX * VWMAPX
16750 ALMAPY = MAPY_MAX * VWMAPY
16760 gosub *RESET_PTN
16770 return
16780 '
17000 '+---==================---+
17010 '|○ フィールドメニュー ○|
17020 '|○ [SUB_MENU] ○|
17030 '+---==================---+
17040 *SUB_MENU
17090 MENULP = 1
17100 while MENULP = 1
17110 MACNO = FLDMAC
17120 gosub *RUN_MAC
17130 gosub *INT_PAD
17140 MXCMD = MENUMAX%
17150 if CMDNO > MXCMD then CMDNO = 1
17160 TIFSET = 1
17170 CNSLON = 1
17180 gosub *SPMENUR
17190 if BTSET = 1 then
17200 FLGON = 0
17220 FLG = STRYFLG%( MENUCMD%(CMDNO,1) )
17230 MACNO = MENUCMD%(CMDNO,0)
17300 if FLG = 1 then gosub *RUN_MAC else gosub *DONT_USE
17400 endif
17410 if CNSLEND = 1 or ENDS = 1 then MENULP = 0
17420 wend
17430 MSG$ = ""
17440 gosub *PUT_MES
17450 gosub *FADE_DISPMAP
17460 gosub *INT_PAD
17470 gosub *CHR_ON
17480 return
17490 '
17500 '+--===========================================--+
17510 '|○ メッセージ表示モジュール2型 (12Dotフォント) ○|
17520 '|○ [Main_PutsMessage/PUT_MES] ○|
17530 '+--===========================================--+
17540 *PUT_MES
17550 *Main_PutsMessage
17560 def font "システム 12ドット"
17570 if MSG$ = "" then MSG$ = MSGW_SPC$
17590 gosub *INT_MSGWIN
17600 SYM$ = MSG$
17610 gosub *INS_SYM
17620 MSG$ = SYM$
17630 gosub *COUNT_MSG
17640 if MEST = 1 then
17650 if MZ > 52 then
17660 SYM$ = mid$ ( MSG$, 1, 52 + BCODE * 3 )
17720 SX = 5
17730 SY = 207
17740 gosub *WRT_SYM
17750 SYM$ = mid$ ( MSG$, 53 + BCODE * 3 )
17770 SX = 5
17780 SY = 220
17790 gosub *WRT_SYM
17800 else
17810 SYM$ = MSG$
17820 SX = 5
17830 SY = 213
17840 gosub *WRT_SYM
17850 endif
17860 else
17870 SYM$ = MSG$
17880 SX = int( ( 52 - MZ ) / 2) * 6 + 5
17890 SY = 213
17900 gosub *WRT_SYM
17910 endif
17920 if STP = 1 then
17930 PADSET = 0
17940 gosub *WAIT_PAD
17950 endif
17960 STP = 1
17970 MSG$ = ""
17980 return
17990 '
18000 '+---==========================---+
18010 '|○ 各種データファイル読み込み ○|
18020 '|○ File #1 ○|
18030 '+---==========================---+
18040 *Sys_DataLoad
18050 FLNO% = 1
18060 if DATACUST = 0 then
18070 on error goto *ERR_PRINTEND
18100 '/* ---<< Read Battle-Customize Data >>--- */
18110 FILE$ = syscfg$(30)
18120 print "- RESS Battle-Command Customizing -"
18130 open sysf$ + FILE$ for input as #FLNO%
18140 input#FLNO%,DUMMY$,BTLMAX%
18150 for I = 1 to BTLMAX%
18160 input #FLNO%, BTLMCMD%(I,0), BTLMCMD%(I,1), BTLM_SUB$(I)
18170 next I
18180 close #FLNO%
18190 '
18200 '/* ---<< Read Menu-Customize Data >>--- */
18210 FILE$ = syscfg$(33)
18220 print "- RESS Menu-Command Customizeing -"
18230 open sysf$ + FILE$ for input as #FLNO%
18240 input#FLNO%,DUMMY$,MENUMAX%
18250 for I = 1 to MENUMAX%
18260 input #FLNO%,MENUCMD%(I,0),MENUCMD%(I,1)
18270 next I
18280 close #FLNO%
18290 '
18300 '/* ---<< Read MacroSystem Data >>---
18310 FILE$ = MACFILE$
18320 print "- RESS MacroCommand Manager v0.91 -
18330 open sysf$ + FILE$ for input as #FLNO%
18340 input#FLNO%,DUMMY$
18350 J = 1
18360 while eof(FLNO%) = 0
18370 input#FLNO%,MACNO%
18380 input#FLNO%,MACLINEMAX%(MACNO%)
18410 for I = 1 to MACLINEMAX%(MACNO%)
18420 input#FLNO%,MACSCP$( MACNO% , I )
18430 next I
18440 J = J + 1
18450 wend
18460 HOWMAC = J
18480 close #FLNO%
18490 '
18500 '/* ---<< Read ITEM DATA >>--- */
18510 FILE$ = ITMFILE$
18520 print "- Item Data Reading -
18530 open sysf$ + FILE$ for input as #FLNO%
18540 input#FLNO%,DUMMY$
18550 for J = 0 to 2
18560 for I = 1 to 8
18570 input#FLNO%,B_ITEM$( J * 10 + I )
18580 next I
18590 next J
18600 close #FLNO%
18610 '
18700 '/* ---<< Animation >>--- */
18710 print "- Sprite☆Animater - Copyright(c) RoCky."
18720 FILE$ = syscfg$(38)
18730 open sysf$ + FILE$ for input as #FLNO%
18740 input#FLNO%,DUMMY$
18750 LOOP = 1
18760 I = 0
18770 while LOOP = 1
18780 I = I + 1
18790 input#FLNO%,TMM$
18800 ANM = val(mid$(TMM$,1,2))
18810 FLM = val(mid$(TMM$,4,2))
18820 ANMG%(ANM,FLM,0) = val(mid$(TMM$,19,3)) 'SPR
18830 ANMG%(ANM,FLM,1) = val(mid$(TMM$,11,3)) ' X
18840 ANMG%(ANM,FLM,2) = val(mid$(TMM$,15,3)) ' Y
18850 ANMG%(ANM,FLM,3) = val(mid$(TMM$, 7,3)) 'CHR
18860 if eof(FLNO%) = -1 then LOOP = 0
18870 wend
18880 close #FLNO%
18890 LMAX = I
18910 '
18920 load@ sysf$ + syscfg$(35) , MESW%
18930 DATACUST = 1
18940 endif
18970 on error goto *ERR_END
18980 return
18990 '
19000 '+---====================---+
19010 '|○ エラートップルーチン ○|
19020 '|○ ○|
19040 '+---====================---+
19100 '/* ---<< 終了エラーー >>--- */
19110 *ERR_END
19120 beep 1
19130 MSG$ = "@rd!!異常エラーが発生しました!!" : gosub *PUT_MES
19140 gosub *ERRCODE_SET
19150 MSG$ = "内容:" + ERC$ : gosub *PUT_MES
19160 MSG$ = "エラー行番号は " + str$(ERL) + "です。" : gosub *PUT_MES
19170 MSG$ = "--強制終了致します--" : gosub *PUT_MES
19180 end
19190 '
19200 '/* ---<<再起可能エラー>>--- */
19210 *ERR_RESUME
19220 beep 1
19230 MSG$ = "@rd!!異常エラーが発生しました!!" : gosub *PUT_MES
19240 gosub *ERRCODE_SET
19250 MSG$ = "内容:" + ERC$ : gosub *PUT_MES
19260 MSG$ = "エラー原因を確認して下さい。" : gosub *PUT_MES
19270 MSG$ = "エラー行番号は " + str$(ERL) + "です。" : gosub *PUT_MES
19280 resume
19290 '
19300 '/* ---<<再起可能エラー>>--- */
19310 *ERR_NEXT
19320 beep 1
19330 MSG$ = "@rd!!異常エラーが発生しました!!" : gosub *PUT_MES
19340 gosub *ERRCODE_SET
19350 MSG$ = "内容:" + ERC$ : gosub *PUT_MES
19360 MSG$ = "エラー原因を確認して下さい。" : gosub *PUT_MES
19370 MSG$ = "エラー行番号は " + str$(ERL) + "です。" : gosub *PUT_MES
19380 resume NEXT
19390 '
19400 '/* ---<< スクリプトエラー >>--- */
19410 *ERR_SCP
19420 beep 1
19430 MSG$ = "@rd!スクリプトモジュールでエラー発生!" : gosub *PUT_MES
19440 MSG$ = SCPFILE$ + " の" + str$(SCP_LINE) +"行目でエラーが発生しました."
19450 gosub *PUT_MES
19460 gosub *ERRCODE_SET : MSG$ = "内容:" + ERC$ : gosub *PUT_MES
19470 MSG$ = "プログラム行番号は " + str$(ERL) + "です。" : gosub *PUT_MES
19480 resume *SERS
19490 '
19500 '/* ---<< 終了エラー(PRINT) >>--- */
19510 *ERR_PRINTEND
19520 beep 1
19530 color 2
19540 print "!!異常エラーが発生しました!!"
19550 gosub *ERRCODE_SET
19560 print "内容:" + ERC$
19570 print "エラー行番号は " + str$(ERL) + "です。終了します。"
19580 end
19590 '
19700 '/* ---<<エラーコード設定>>--- */
19710 *ERRCODE_SET
19720 ERC$ = ""
19730 if ERR = 53 or ERR = 59 or ERR = 60 or ERR = 72 or ERR = 75 then
19740 ERC$ = "ドライブ入出力エラーです。"
19750 else if ERR = 6 or ERR = 9 or ERR = 15 then
19760 ERC$ = "作成データのユーザーミスです。" + str$(ERR) + "☆"
19770 else if ERR = 54 or ERR = 58 then
19780 ERC$ = "作成データ内が正しく記述されていません。"
19790 else if ERR = 82 or ERR = 83 or ERR = 7 then
19800 ERC$ = "メモリに関するエラーです。"
19810 endif
19900 if ERR = 28 then ERC$ = "システム環境が対応していません。"
19910 if ERR = 55 then ERC$ = "ファイル/パス名の記述が正しくありません。"
19920 if ERR = 63 then ERC$ = "指定されたファイルが存在しません。"
19930 if ERR = 73 then ERC$ = "ディスクが書き込み禁止です。"
19940 if ERR = 112 then ERC$ = "TIFFファイルの画面モードが異常です。"
19950 if ERR = 115 then ERC$ = "CD演奏でデータトラックが指定されています。"
19960 if ERR = 121 then ERC$ = "数値データしか入力できません。"
19970 if ERC$ = "" then ERC$ = "プログラムエラーです。" + str$(ERR) + "☆"
19980 return
19990 '
20000 '/* ---<< 起動時メモリチェック >>--- */
20010 *Sys_StartMemory
20020 gosub *SND_BOOT98
20030 cls
20040 print "RESS Starting..."
20050 TMP& = fre(4)
20060 for I = 0 to int( TMP& / 1024 ) step 32
20070 locate 0,2
20080 print "Free Memory ... ";I;"K Bytes."
20090 next I
20100 TMP& = fre(4) * 0.8
20110 if TMP& <= 700*1024 then
20120 print "警告:システム動作用メモリが不足しています." : end
20130 endif
20140 return
20150 '
20300 '/* ---<<メモリチェック>>--- */
20310 *Sys_MemoryCheck
20320 print "Memory Checking..."
20330 TMP& = fre(3)
20340 if TMP& <= 500*1024 then
20350 EREND = 1
20360 RESSEND = 1
20370 print "警告:システム動作用メモリが不足しています."
20380 else
20390 if TMP& < 520*1024 then
20400 SMODE$ = "エコノミーモード" : FREXCL = 0
20410 else if TMP& => 520*1024 and TMP& < 800*1024 then
20420 SMODE$ = "スタンダードモード" : FREXCL = 1
20430 else if TMP& => 800*1024 then
20440 SMODE$ = "エンハンスドモード" : FREXCL = 2
20450 endif
20460 gosub *VIEW_MEMORY
20470 endif
20520 return
20530 '
20700 '/* ---<<オープニングロゴ>>--- */
20710 *Sys_ShowLogo
20720 if LOGOSET = 0 then
20730 screen@ 2
20740 cls
20750 def font "システム 16ドット"
20760 if ptrig(PORT) = 0 then
20770 palette 0,[ 0, 0, 0]
20780 palette 1,[ 0, 0, 0]
20790 symbol (200,223),"Executing RESS. (c)Rocky",1,1,%1,,,1
20800 for L = 0 to 255 step 4
20810 if ptrig(PORT) = 2 then L = 254 : gosub *SND_PAD
20820 palette 1,[L,L,L]
20830 wait 1
20840 next L
20850 for L = 0 to 150
20860 if ptrig(PORT) = 2 then L = 199 : gosub *SND_PAD
20870 wait 1
20880 next L
20890 for I = 255 to 0 step -4
20900 if ptrig(PORT) = 2 then I = 1 : gosub *SND_PAD
20910 palette 1,[I,I,I]
20920 wait 1
20930 next I
20940 endif
20950 screen@ 0
20960 LOGOSET = 1
20970 endif
20980 return
20990 '
22000 '+--====================================--+
22010 '|○ 主人公移動モジュール ○|
22020 '|○ [S_UP] [S_DOWN] [S_RIGHT] [S_LEFT] ○|
22030 '+--====================================--+
22100 '/* ---<<主人公を上へ動かす>>--- */
22110 *S_UP
22130 if MVCHG = 1 then sprite 1,MCHR%(0,1),MCHR%(0,0)+2
22140 if SMAPY = 1 then
22150 beep
22160 else
22170 if MAP_DATA%(SMAPX,SMAPY-1) <= EVPTN or DBM = 4 then
22180 SMAPY = SMAPY - 1
22190 if SMAPY = VWMAPY * (MAPY-1) then
22200 MAPY = MAPY - 1
22210 if EXCLAS => 1 then
22220 gosub *Main_Rollup
22230 else
22240 gosub *CHR_OFF
22250 sprite 6,MCHR%(0,1),0,176-sprite(MCHR%(0,1),7)
22260 gosub *DISP_MAP
22270 gosub *CHR_ON
22280 endif
22290 else
22300 MMV_CHR = MCHR%(0,1)
22320 SPRCLR = 1
22330 gosub *CHR_UP
22340 endif
22350 gosub *EVENT
22360 endif
22370 endif
22380 return
22390 '
22500 '/* ---<<主人公を右へ動かす>>--- /*
22510 *S_RIGHT
22530 if MVCHG = 1 then sprite 1,MCHR%(0,1),MCHR%(0,0)+6
22540 if SMAPX = VWMAPX * MAPX_MAX then
22550 beep
22560 else
22570 if MAP_DATA%(SMAPX+1,SMAPY) <= EVPTN or DBM = 4 then
22580 SMAPX = SMAPX + 1
22590 if SMAPX = VWMAPX * MAPX + 1 then
22600 MAPX = MAPX + 1
22610 if EXCLAS => 1 then
22620 gosub *Main_Rollright
22630 else
22640 gosub *CHR_OFF
22650 sprite 6,MCHR%(0,1),0-sprite(MCHR%(0,1),6),0
22660 gosub *DISP_MAP
22670 gosub *CHR_ON
22680 endif
22690 else
22700 MMV_CHR = MCHR%(0,1)
22710 SPRCLR = 1
22720 gosub *CHR_RIGHT
22730 endif
22740 gosub *EVENT
22750 endif
22760 endif
22770 return
22780 '
23000 '/* ---<<主人公を下へ動かす>>--- /*
23010 *S_DOWN
23030 if MVCHG = 1 then sprite 1,MCHR%(0,1),MCHR%(0,0)+0
23040 if SMAPY = VWMAPY * MAPY_MAX then
23050 beep
23060 else
23070 if MAP_DATA%(SMAPX,SMAPY+1) <= EVPTN or DBM = 4 then
23080 SMAPY = SMAPY + 1
23090 if SMAPY = VWMAPY * MAPY + 1 then
23100 MAPY = MAPY + 1
23110 if EXCLAS => 1 then
23120 gosub *Main_Rolldown
23130 else
23140 gosub *CHR_OFF
23150 sprite 6,MCHR%(0,1),0,16-sprite(MCHR%(0,1),7)
23160 gosub *DISP_MAP
23170 gosub *CHR_ON
23180 endif
23190 else
23200 MMV_CHR = MCHR%(0,1)
23210 SPRCLR = 1
23220 gosub *CHR_DOWN
23230 endif
23240 gosub *EVENT
23250 endif
23260 endif
23270 return
23280 '
23500 '/* ---<<主人公を左へ動かす>>--- */
23510 *S_LEFT
23530 if MVCHG = 1 then sprite 1,MCHR%(0,1),MCHR%(0,0) + 4
23540 if SMAPX = 1 then
23550 beep
23560 else
23570 if MAP_DATA%(SMAPX-1,SMAPY) <= EVPTN or DBM = 4 then
23580 SMAPX = SMAPX - 1
23590 if SMAPX = VWMAPX * (MAPX-1) then
23600 MAPX = MAPX - 1
23610 if EXCLAS => 1 then
23620 gosub *Main_Rollleft
23630 else
23640 gosub *CHR_OFF
23650 sprite 6,MCHR%(0,1),240-sprite(MCHR%(0,1),6),0
23660 gosub *DISP_MAP
23670 gosub *CHR_ON
23680 endif
23690 else
23700 MMV_CHR = MCHR%(0,1)
23710 SPRCLR = 1
23720 gosub *CHR_LEFT
23730 endif
23740 gosub *EVENT
23750 endif
23760 endif
23770 return
23780 '
24000 '+--======================================--+
24010 '|○ 総合スクロールルーチン ○|
24020 '| [ Main_Rolldown ] [ Main_Rollup ] |
24030 '|○ [ Main_Rollright ] [ Main_Rollleft ] ○|
24040 '+--======================================--+
24100 '/* ---<<下にスクロールする>>--- */
24110 *Main_Rolldown
24120 if EXCLAS => 1 then
24130 gosub *MBIN_MAP
24140 TPSET = 0
24150 J = 0
24160 for I = 1 to 11*(16/SCRL)
24180 get@a ( 32, 16+SCRL) - (287,191 ),EXGBF%
24190 put@a ( 32, 16 ) - (287,191-SCRL),EXGBF%
24200 put@a ( 32,192-SCRL) - (287,191),GRP%,,,,,(I-1)*SCRL*256
24210 if J < 16/SCRL then J = J + 1 else sprite 6,MCHR%(0,1),0,-SCRL
24220 next I
24230 endif
24240 return
24250 '
24300 '/* ---<<上にスクロールする>>--- */
24310 *Main_Rollup
24320 if EXCLAS >= 1 then
24330 gosub *MBIN_MAP
24340 TPSET = 0
24350 J = 0
24360 for I = 11*(16/SCRL) to 1 step -1
24380 get@a ( 32, 16) - (287,191-SCRL),EXGBF%
24390 put@a ( 32,SCRL+16) - (287,191 ),EXGBF%
24400 put@a ( 32, 16) - (287, 15+SCRL),GRP%,,,,,(I-1)*SCRL*256
24410 if J < 16/SCRL then J = J + 1 else sprite 6,MCHR%(0,1),0,SCRL
24420 next I
24430 endif
24440 return
24450 '
24500 '/* ---<<左にスクロールする>>--- */
24510 *Main_Rollleft
24520 if EXCLAS >= 1 then
24530 gosub *MBIN_MAPSUB
24540 TPSET = 0
24550 J = 0
24550 for I = 32 to 1 step -1
24570 get@a ( 32, 16) - (279,191),EXGBF%
24580 put@a ( 40, 16) - (287,191),EXGBF%
24590 put@a ( 32, 16) - ( 39,191),GRP%,,,,,(I-1)*1408
24600 if I <= 30 then sprite 6,MCHR%(0,1),8,0
24610 next I
24620 endif
24630 return
24640 '
24700 '/* ---<<右にスクロールする>>--- */
24710 *Main_Rollright
24720 if EXCLAS >= 1 then
24730 gosub *MBIN_MAPSUB
24740 TPSET = 0
24750 for I = 1 to 32
24770 get@a ( 40, 16) - (287,191),EXGBF%
24780 put@a ( 32, 16) - (279,191),EXGBF%
24790 put@a (280, 16) - (287,191),GRP%,,,,,(I-1)*1408
24800 if I > 2 then sprite 6,MCHR%(0,1),-8,0
24810 next I
24820 endif
24830 return
24840 '
25000 '+--=========================================--+
25010 '|○ メニューシステムモジュール ○|
25020 '|○(FILE$,MX,MY,MXCMD,CMDNO,TIFSET,CNSLON)○|
25040 '+--=========================================--+
25050 *SPMENUR
25100 if TIFSET = 0 then load@ FILE$,(MX,MY)
25110 if CMDNO = 0 then CMDNO = 1
25120 for I = 1 to MXCMD
25130 line (MX+3+I*16, MY+5) - (MX+12+I*16, MY+10),pset,[ 0, 0, 0],bf
25140 next I
25150 gosub *INT_PAD
25160 KCL = 0
25170 DWKCL = 0
25180 BTSET = 0
25270 while BTSET = 0
25280 if PD = 7 then CMDNO = CMDNO - 1
25290 if CMDNO = 0 then CMDNO = MXCMD
25300 if PD = 3 then CMDNO = CMDNO + 1
25310 if CMDNO > MXCMD then CMDNO = 1
25320 if PT = 1 then BTSET = 1
25330 if PT = 2 and CNSLON = 1 then BTSET = 2
25350 wait PADWAIT
25370 for I = 1 to MXCMD
25380 line (MX+3+I*16,MY+5) - (MX+12+I*16,MY+10),pset,[0,0,0],bf
25390 next I
25400 gosub *INT_PAD
25410 while PD = 0
25420 if DWKCL = 0 then KCL = KCL + KCLSPD
25430 if DWKCL = 1 then KCL = KCL - KCLSPD
25440 if KCL > 255 then DWKCL = 1 : KCL = 255
25450 if KCL < 0 then DWKCL = 0 : KCL = 0
25460 X = MX + 3 + CMDNO * 16
25470 Y = MY + 5
25480 line ( X, Y) - ( X + 9, Y + 5),pset,[KCL,KCL,KCL],bf
25490 gosub *INP_PAD
25500 if PT <> 0 or BTSET <> 0 then PD = 99
25530 wend
25540 gosub *SND_PAD
25550 wend
25560 for I = 1 to MXCMD
25570 line (MX+3+I*16,MY+5) - (MX+12+I*16,MY+10),pset,[ 0, 0, 0],bf
25580 next I
25600 CNSLEND = 0
25620 if CNSLON = 1 and BTSET = 2 then
25630 CNSLEND = 1
25640 line (MX+3,MY+3) - (MX+11,MY+11),xor,7,b
25650 endif
25670 return
25680 '
25690 '
26000 '+--==============================--+
26010 '|○ 記録ノート読み込み/保存 ○|
26020 '|○ (メニューモジュール使用) File #1 ○|
26030 '+--==============================--+
26100 *FILELOAD_1
26110 MACNO = SVNMAC
26120 gosub *RUN_MAC
26130 gosub *SUB_NOTEMENU
26140 if FILEN = 6 then FILEN = 0
26150 DEMO = 1
26160 gosub *MainLOADNOTE
26170 return
26180 '
26200 *NOTESAVE_1
26210 MACNO = LDNMAC
26220 gosub *RUN_MAC
26230 gosub *SUB_NOTEMENU
26240 if FILEN = 6 then FILEN = 0
26250 gosub *MainSAVENOTE
26260 return
26270 '
26300 '/* ---<<ノート読込/保存時のメニュー呼出>>--- */
26310 *SUB_NOTEMENU
26320 MXCMD = 6
26330 TIFSET = 1
26340 CNSLON = 0
26350 CMDNO = FILEN
26360 gosub *SPMENUR
26370 FILEN = CMDNO
26380 return
26390 '
27000 '/* ---<<ノート読込本体>>--- */
27010 *MainLOADNOTE
27020 FLNO% = 1
27030 if FILEN <= 5 and FILEN => 0 then
27040 FILE$ = SAVEF$ + "SP_SAV" + mid$( str$(FILEN),2 ) + ".RCY"
27050 on error goto *ERR_RESUME
27060 open FILE$ for input as #FLNO%
27070 for I = 0 to 16+STRYMAX
27080 input#FLNO%,TMP%(I)
27090 next I
27100 close #FLNO%
27110 on error goto *ERR_END
27120 TMP% = TMP%(0)
27130 LV = TMP%(1)
27140 MAXHP = TMP%(2): HP = TMP%(3)
27150 MAXMP = TMP%(4): MP = TMP%(5)
27160 PWR = TMP%( 6) : SBY = TMP%( 7) : MGC = TMP%( 8)
27170 WPN = TMP%( 9) : ARM = TMP%(10) : SLD = TMP%(11)
27180 EX = TMP%(12) : GLD = TMP%(13)
27190 ALMAPS = TMP%(14) : SMAPX = TMP%(15) : SMAPY = TMP%(16)
27200 for I = 1 to STRYMAX
27210 STRYFLG%(I) = TMP%(I+16)
27220 next I
27230 gosub *SET_MAPPOINT
27240 gosub *SET_SPRPOINT
27250 if DBM <> 4 then gosub *READ_MAP
27260 if FILEN = 0 and DEMO = 1 then
27270 HP = MAXHP
27280 MP = MAXMP
27290 SCPFILE$ = syscfg$(61)
27300 gosub *SCRPT_RUN
27310 MENULP = 0
27400 endif
27410 if DBM <> 4 then
27420 SND = 1
27430 gosub *DEL_POWER
27440 gosub *DRAW_POWER
27450 endif
27460 gosub *INT_SFLG
27470 endif
27480 return
27490 '
27500 '/* ---<<ノート保存本体>>--- */
27510 *MainSAVENOTE
27520 gosub *INT_SFLG
27530 if FILEN <> 0 then
27540 MSG$ = "只今ノートを記録中です♪@th@wh" : gosub *PUT_MES
27550 FILE$ = savef$ + "SP_SAV" + mid$( str$( FILEN ),2 ) + ".RCY"
27570 kill FILE$
27580 FLNO% = 1
27590 TMP%( 0) = 9107
27600 TMP%( 1) = LV
27610 TMP%( 2) = MAXHP : TMP%( 3) = HP
27620 TMP%( 4) = MAXMP : TMP%( 5) = MP
27630 TMP%( 6) = PWR : TMP%( 7) = SBY : TMP%( 8) = MGC
27640 TMP%( 9) = WPN : TMP%(10) = ARM : TMP%(11) = SLD
27650 TMP%(12) = EX : TMP%(13) = GLD
27660 TMP%(14) = ALMAPS : TMP%(15) = SMAPX : TMP%(16) = SMAPY
27670 for I = 1 to STRYMAX
27680 TMP%(I+16) = STRYFLG%(I)
27690 next I
27700 on error goto *ERR_RESUME
27710 open FILE$ for output as #FLNO%
27720 for I = 0 to 16 + STRYMAX
27730 write#FLNO%,TMP%(I)
27740 next I
27750 close #FLNO%
27760 on error goto *ERR_END
27770 else
27780 MSG$ = "@rd0番のノートには記録できないんで~す。▼"
27790 gosub *PUT_MES
27800 MSG$ = "@rdもう一度別のノートを選んでねっ! ▼@wh"
27810 gosub *PUT_MES
27820 endif
27830 return
27840 '
30000 '+--================--+
30010 '|○ 戦闘モジュール ○|
30020 '|○ ○|
30040 '+--================--+
30100 /* ---<< ザコ >>--- */
30110 *BATTLE
30120 if ENDS = 0 then
30130 if MNSON = 1 then
30140 gosub *BTL_SET
30150 gosub *BTL_MAIN
30160 endif
30170 endif
30180 return
30190 '
30200 '/* ---<< ボス >>--- */
30210 *NBOSBTL
30220 if ENDS = 0 then
30230 BOSS = 1
30240 gosub *BTL_BOSSSET
30250 gosub *BTL_MAIN
30260 BOSS = 0
30270 endif
30280 return
30290 '
30300 '/* ---<< ラスボス >>--- */
30310 *LBOSBTL
30320 if ENDS = 0 then
30330 BOSS = 2
30340 gosub *BTL_BOSSSET
30350 gosub *BTL_MAIN
30360 BOSS = 0
30370 endif
30380 return
30390 '
30700 '/* ---<<戦闘準備>>--- */
30710 *BTL_SET
30720 MACNO = ZKBMAC
30730 gosub *RUN_MAC
30740 return
30750 '
30800 '/* ---<< ボス戦闘準備 >>--- */
30810 *BTL_BOSSSET
30820 MACNO = BSBMAC
30830 gosub *RUN_MAC
30840 MSLV = 99
30850 MSHP = MSMXHP
30860 MSTNF = 1
30870 ZKSET = 0
30880 return
30890 '
31000 '/* ---<< 戦闘開始 >>--- */
31010 *BTL_MAIN
31020 if CMDNO > BTLMAX% then CMDNO = 1
31030 sprite 0,BCHR%(0,1),1
31040 gosub *SPRSET_MONSTER
31050 gosub *SETPS_SPR_MONSTER
31060 gosub *SETPS_SPR_SJ
31070 MSA = 1
31080 while MSA = 1
31090 gosub *CDREP
31100 MSG$ = "どうする? [行動選択]@th"
31110 gosub *PUT_MES
31120 MXCMD = BTLMAX%
31130 TIFSET = 1
31140 CNSLON = 0
31150 gosub *SPMENUR
31160 gosub *ITX
31170 if MSA = 1 then
31180 if BOSS = 1 then gosub *BTL_BOS_WPNSEL
31190 MACNO = val( syscfg$(64) )
31200 gosub *RUN_MAC
31210 endif
31220 wend
31300 if ENDS <> 1 then
31310 if BOSS = 1 then gosub *BTL_BOS_ENDMES
31320 gosub *DIE_MONSTER
31330 CDNO = CDBG
31340 gosub *CDPLY
31350 if MSA = 3 then
31360 MSG$ = "うまく逃げ出せた! ▼" : gosub *PUT_MES
31370 else
31380 gosub *EXGLDUP
31390 gosub *STSUP
31400 gosub *LVUP
31410 endif
31440 endif
31450 sprite 0,BCHR%(0,1),0
31460 MSG$ = ""
31470 gosub *PUT_MES
31480 gosub *FADE_DISPMAP
31490 gosub *CHR_ON
31500 return
31510 '
32000 '+--====================--+
32010 '|○ 戦闘サブモジュール ○|
32030 '+--====================--+
32090 '/* ---<< コマンド実行 >>--- */
32100 *ITX
32110 if STRYFLG%( BTLMCMD%(CMDNO,1) ) = 1 then
32120 MACNO = BTLMCMD%(CMDNO,0)
32130 gosub *RUN_MAC
32140 else
32150 gosub *DONT_USE
32170 endif
32180 return
32190 '
32200 '/* ---<< モンスターのスプライト設定 >>--- */
32210 *SPRSET_MONSTER
32220 if MSSIZE = 1 then
32230 if ZKSET = 0 then
32240 load@ sysf$ + MSTIF$,(320, 0)
32250 gosub *TOKA
32260 BX = 320
32270 BY = 0
32280 OFSET = ST_MS1SPR%
32290 gosub *SPRSET_4
32300 endif
32310 if DEFSPR_MONS1 = 0 then
32320 def sprite 1,BCHR%(1,1),( 0,240),BCHR%(1,0),2,2
32330 DEFSPR_MONS1 = 1
32340 endif
32350 sprite 0,BCHR%(1,1),1
32360 sprite 1,BCHR%(1,1),ST_MS1SPR%
32380 else if MSSIZE = 2 then
32390 load@ sysf$ + MSTIF$,(320, 0)
32400 gosub *TOKA
32410 BX = 320
32420 BY = 0
32430 OFSET = ST_MS2SPR%
32440 gosub *SPRSET_16
32450 if DEFSPR_MONS2 = 0 then
32460 def sprite 1,BCHR%(2,1),( 0,240),BCHR%(2,0),4,4
32470 DEFSPR_MONS2 = 1
32480 endif
32490 sprite 0,BCHR%(2,1),1
32500 sprite 1,BCHR%(2,1),ST_MS2SPR%
32520 else if MSSIZE = 3 then
32630 load@ sysf$ + MSTIF$,(320, 0)
32640 gosub *TOKA
32650 BX = 320
32660 BY = 0
32670 OFSET = ST_MS3SPR%
32680 gosub *SPRSET_81
32690 if DEFSPR_MONS3 = 0 then
32700 def sprite 1,BCHR%(3,1),( 0,240),BCHR%(3,0),9,9
32710 DEFSPR_MONS3 = 1
32720 endif
32730 sprite 0,BCHR%(3,1),1
32740 sprite 1,BCHR%(3,1),ST_MS3SPR%
32760 endif
32780 return
32790 '
33000 '/* ---戦闘終了時処理--- */
33010 *EXGLDUP
33020 sprite 1,BCHR%(0,1),BWINPTN%
33030 TMP%(9) = MSEXP - LV
33040 if TMP%(9) < 1 then TMP%(9) = 1
33050 GLD = GLD + MSGLD
33060 EX = EX + TMP%(9)
33070 MSG$ = "@whモンスター達をやっつけた! ▼" : gosub *PUT_MES
33080 MSG$ = "経験値" + str$( TMP%(9) )+"を獲得! ▼": gosub *PUT_MES
33090 MSG$ = str$(MSGLD) + "Gを手に入れた。▼" : gosub *PUT_MES
33100 gosub *PUT_EXGLD
33110 gosub *INT_BTLSPR
33120 return
33130 '
33300 '/* ---<< 7000G 獲得おめでたう >>--- */
33310 *STSUP
33320 if GLD => 7000 then
33330 MEST = 1
33350 MSG$ = "@mzパンパカパ~ン! 7000G獲得おめでとうございま~す! ▼"
33360 gosub *PUT_MES
33370 MSG$ = "記念に、レベルアップを差し上げま~す。▼": gosub *PUT_MES
33330 MEST = 0
33350 EX = LV * 11 + 1
33360 GLD = 0
33370 endif
33380 return
33390 '
33500 '/* ---<<レベルアップ>>--- */
33510 *LVUP
33520 if EX => LV * 11 then
33530 ' ファンファーレ・・・・を作りたいけど難しい!
33540 ' 作って下さる方いらっしゃいませんか? ご連絡下さい。
33550 MSG$ = "@wh#NMはレベルアップした! ▼" : gosub *PUT_MES
33560 LV = LV + 1
33570 MAXHP = MAXHP + int( RND * 5 ) + 4
33600 if MAXHP > 179 then MAXHP = 179
33610 MAXMP = MAXMP + int( RND * 5 ) + 4
33620 if MAXMP > 179 then MAXMP = 179
33630 PWR = PWR + int( RND * 4 ) + 2
33640 if PWR > 99 then PWR = 99
33650 SBY = SBY + int( RND * 4 ) + 2
33670 if SBY > 99 then SBY = 99
33680 MGC = MGC + int( RND * 4 ) + 2
33690 if MGC > 99 then MGC = 99
33700 tmp$(9) = "になったぁ! ▼@st"
33710 MSG$ = "#NMはLevel#LV になったぁ! ▼@st" : gosub *PUT_MES
33720 MSG$ = "最大HPが" + str$(MAXHP) + TMP$(9) : gosub *PUT_MES
33730 MSG$ = "最大MPが" + str$(MAXMP) + TMP$(9) : gosub *PUT_MES
33740 MSG$ = "体力が " + str$(PWR) + TMP$(9) : gosub *PUT_MES
33750 MSG$ = "素早さが" + str$(SBY) + TMP$(9) : gosub *PUT_MES
33760 MSG$ = "魔法力が" + str$(MGC) + TMP$(9) : gosub *PUT_MES
33770 EX = 0
33780 gosub *PUT_EXGLD
33790 HP = MAXHP
33800 MP = MAXMP
33810 SND = 1
33820 gosub *DEL_POWER
33830 gosub *DRAW_POWER
33850 endif
33880 return
33890 '
34000 '/* --- ボスの死んだ時のセリフ --- */
34010 *BTL_BOS_ENDMES
34020 return
34030 '
34040 for BBEM = 1 TO MESX_END 'デバッグが応募に間に合いませんでした(泣)
34050 CMDL$ = BSEND$(I) 'なぜかエラーがでちゃう・・・・(T_T)
34060 gosub *SCP_MAIN 'なお、このデータ読み込みは削りました.
34070 next BBEM
34080 return
34090 '
34200 '/* ---<< ボスの攻撃方法選択>>--- */
34210 *BTL_BOS_WPNSEL
34220 CMDL$ = BSMES$(MSTNF)
34240 gosub *SCP_MAIN
34250 MSTNF = MSTNF + 1
34260 if MSTNF > MEX then MSTNF = 1
34270 I = ( rnd*6 ) + 1
34280 BSWPN$(0) = BSWPN$(I)
34290 MSATP = BSWPP%(I)
34300 return
34310 '
34500 '/* ---<<モンスター選択>>--- */
34510 *MST_SEL
34520 OLDMSTIF$ = MSTIF$
34530 I = int( RND * 8 ) + 1
34540 if ZST <> 0 then I = ZST
34550 MSNAME$ = MSNMD$(I)
34560 MSLV = MSLVD(I) : MSMXHP=MSMXHPD(I)
34570 MSEXP = MSEXPD(I) : MSGLD = MSGLDD(I)
34580 MSATP = MSATPD(I) : MSDFP = MSDFD(I)
34590 CLJ = CLJD(I)
34600 MSTIF$ =MSTIFD$(I)
34610 MSSIZE = MSSIZD(I)
34620 MSHP = MSMXHP
34630 if MSTIF$ = OLDMSTIF$ then ZKSET = 1 else ZKSET = 0
34640 return
34650 '
37000 '+---=======================---+
37010 '|○ ステータス表示 ○|
37030 '+---=======================---+
37040 *Main_Puts_States
37050 *Main_STSView
37100 gosub *INT_PAD
37110 gosub *DISP_MAP
37120 MJC = 1
37130 gosub *FADE_PASTEL
37140 MSG$ = "@gr@th<< ステータス表示 >>"
37150 gosub *PUT_MES
37160 if EXCLAS => 1 then gosub *SBUF_IN
37200 symbol ( 36, 17),"<<■ メインステータス ■>>",S!,S!,7,,,1
37210 symbol ( 36, 30),"名前 :" + NAM$ ,S!,S!,7
37220 symbol ( 36, 43),"Level:" + str$(LV) ,S!,S!,7
37230 symbol ( 36, 56),"HP :" + str$(HP) ,S!,S!,7
37240 symbol ( 36, 69),"最大HP:" + str$(MAXHP),S!,S!,7
37250 symbol ( 36, 82),"MP :" + str$(MP) ,S!,S!,7
37260 symbol ( 36, 95),"最大MP:" + str$(MAXMP),S!,S!,7
37270 symbol ( 36,108),"体力 :" + str$(PWR),S!,S!,7
37280 symbol ( 36,121),"素早さ:" + str$(SBY),S!,S!,7
37290 symbol ( 36,134),"魔法力:" + str$(MGC),S!,S!,7
37300 symbol ( 36,147),"攻撃 :" + B_ITEM$(WPN),S!,S!,7
37310 symbol ( 36,160),"防御 :" + B_ITEM$(ARM+10),S!,S!,7
37320 symbol ( 36,173),"シールド :" + B_ITEM$(SLD+20),S!,S!,7
37330 PADSET = 0
37340 gosub *WAIT_PAD
37350 gosub *INT_PAD
37360 wait SYSWAIT
37370 if EXCLAS => 1 then
37380 gosub *SBUF_OUT
37390 else
37400 gosub *DISP_MAP
37410 MJC = 1
37420 gosub *FADE_PASTEL
37430 endif
37440 symbol ( 36, 18),"<<■ 戦闘時コマンド使用状況 ■>>",S!,S!,7,,,1
37450 for I = 4 to 14
37460 if STRYFLG%( BTLMCMD%(I,1) ) = 1 then
37470 TMM$="使えます."
37480 else
37490 TMM$="使えません."
37500 endif
37510 symbol ( 36, 18 + (I-3)*14 ),BTLM_SUB$(I) + ":" + TMM$,S!,S!,7
37520 next I
37530 PADSET = 0
37900 gosub *WAIT_PAD
37910 gosub *INT_PAD
37920 if EXCLAS => 1 then gosub *SBUF_OUT else gosub *FADE_DISPMAP
37930 gosub *DISP_MAP
37940 wait SYSWAIT
37950 return
37960 '
38000 '+--================--+
38010 '|○ フェード ○|
38020 '+--================--+
38030 '/* ---<<全画面消去>>--- */
38040 *FADE_1
38050 for I = 0 to 119
38060 line ( I, I) - (319-I,239-I),pset,[0,0,0],b
38070 next I
38080 return
38090 '
38200 '/* ---<<全画面回転消去>>--- */
38210 *FADE_2
38220 gosub *MBUF_IN
38230 for I = 0 to 119
38240 put@a ( I, I) - (319-I,239-I),GRP%
38250 line ( I, I) - (319-I,239-I),pset,[0,0,0],b
38260 next I
38270 return
38280 '
38300 '/* ---<<移動領域消去)>>--- */
38310 *FADE_3
38330 for I = 0 to 88
38340 line (32+I,16+I) - (287-I,191-I),pset,[0,0,0],b
38350 next I
38370 return
38390 '
38400 '/* ---<<中央回転消去>>--- */
38410 *FADE_4
38420 get@a ( 32, 16) - (287,191),GRP%
38430 for I = 0 to 88
38440 put@a ( 32+I, 16+I) - ( 287-I, 191-I),GRP%
38450 line ( 32+I, 16+I) - ( 287-I, 191-I),pset,[0,0,0],b
38460 next I
38470 return
38480 '
38500 '/* <<to粗モザイク>>--- */
38510 *FADE_5
38520 if EXCLAS = 0 then return
38530 gosub *SBUF_IN
38540 SPEED = 2
38550 for Z = 2 to 32 step SPEED
38560 gosub *MOZAIC
38570 next Z
38580 return
38590 '
38600 '/* <<to細モザイク>>--- */
38610 *FADE_6
38620 if EXCLAS = 0 then return
38630 SPEED = 2
38640 for Z = 32 to 2 step -SPEED
38650 gosub *MOZAIC
38660 next Z
38670 gosub *SBUF_OUT
38680 return
38690 '
38700 '/* 全体表示
38710 *FADE_7
38720 for I = 119 to 0 step -1
38730 line ( I, I) - (319-I,239-I),pset,[0,0,0],b
38740 put@a ( I, I) - (319-I,239-I),GRP%
38750 next I
38770 return
38790 '
38800 '/* 8
38810 *FADE_8
38820 for I = 0 to 10
38830 for J = 0 to 15
38840 line (32,I*16+J)-(287,I*16+J),pset,MJC,b
38850 next J
38860 next I
38870 return
38890 '
38900 '/* 9
38910 *FADE_9
38920 pastel 255
38930 MJC = 0
38950 gosub *FADE_PASTEL
38960 return
38990 '
39000 '/* □■○●▽▼ 小物サブルーチン群 ▼▽●○■□ */
39010 '
39020 '/* ---<<リザーブドメッセージ>>--- */
39030 *RESVD
39040 MSG$ = "@mzごめんなさい! まだ作ってないの(T_T) ▼@wh"
39060 gosub *PUT_MES
39080 return
39090 '
39100 '/* ---<<パッド入力待ち>>--- (PADSET) */
39110 *WAIT_PAD
39120 gosub *INT_PAD
39130 while PT = 0
39140 wait PADWAIT
39150 gosub *INP_PAD
39160 if PADSET = 5 and PT = 1 then PT = 0 'Aボタンは不可
39170 if PADSET = 4 and PT = 2 then PT = 0 'Bボタンは不可
39180 if PADSET = 3 and PD <> 0 then PT = 99 'カーソルボタンでも可
39190 if PADSET = 2 then
39200 if BTSET <> 0 then PT = 99
39210 if PD <> 0 then PT = 99
39220 endif
39230 wend
39240 gosub *SND_PAD
39250 PADSET = 0
39260 return
39270 '
39300 '/* ---<<PAD入力検出ウェイト>>--- */
39310 *WAITX
39320 for I = 0 to WAITES
39330 if ptrig(PORT) <> 0 then
39340 I = WAITES - 1 : gosub *SND_PAD
39350 endif
39360 wait 1
39370 next I
39380 return
39390 '
39400 '/* ---<<パッド管理>>--- */
39410 *INT_PAD
39420 PT = 0
39430 PD = 0
39440 return
39450 '
39500 '/* ---<<スキャンモード変更>>--- */
39510 *ScanChg
39520 if SCAN = 1 then
39530 SCAN = 0
39540 sprite on
39550 sprite screen (32,0)
39560 else
39570 SCAN = 1
39580 gosub *SCRN_CHANGE
39590 endif
39600 wait 20
39610 return
39620 '
39630 '/* ---<< PAD >>--- */
39640 *INP_PAD
39660 PT = ptrig(PORT)
39670 PD = pad(PORT)
39680 return
39690 '
39700 '/* ---<<スプライトON>>--- */
39710 *Sys_SpriteOn
39720 *SPR_ON
39730 sprite on
39740 if SCAN = 0 then sprite screen (32,0)
39750 if SCAN = 1 then gosub *SCRN_CHANGE
39770 return
39780 '
39800 '/* ---<<目玉TOWNSウェイト解除機能>>--- */
39810 *Sys_WaitSet
39820 if HDWAIT = 1 then
39830 M = inp(&H0031) '機種判定
39840 if M = 1 then out &H05E0,2
39850 if M = 2 then out &H05E2,1
39860 if M = 4 then out &H05E2,0
39870 endif
39880 return
39890 '
39900 '/* ---<<パッド入力サウンド>>--- */
39910 *SND_PAD
39920 if PADSND = 1 then beep 363523,2,900
39930 return
39940 '
39950 '/* ---<<画面枠をロードする>>--- */
39960 *DRW_WAKU
39970 load@ SYSF$ + WAKUFILE$,( 0, 0)
39980 return
39990 '
40000 '/* ---<<CG画面OFF・ON>>--- */
40010 *CG_OFF
40020 out &hFDA0,&H3,1
40030 return
40040 '
40050 *CG_ON
40060 out &hFDA0,&HF,1
40070 return
40080 '
40100 '/* ---<<FAST-ON・OFF>>--- */
40110 *FAST_ON
40120 if FAST = 1 then
40130 out &H5EC,1
40140 endif
40150 return
40160 '
40170 *FAST_OFF
40180 if FAST = 1 then
40190 out &H5EC,0
40200 endif
40210 return
40220 '
40240 '/* --<<メニューコマンド実行拒否>>-- */
40250 *DONT_USE
40260 MSG$ = "@mzこのコマンドは現在使用できません!@wh"
40270 gosub *PUT_MES
40280 return
40290 '
40300 '/* ---<< 使用マップパターン変更 >>--- */
40310 *RESET_PTN
40320 if OLDPTN <> PTNNUM then
40330 FILE$ = PTNBANK$(PTNNUM)
40340 gosub *MAKE_PTN_1
40350 if DBM = 4 then TPSET = 0
40360 endif
40370 return
40380 '
40400 '/* ---<<CHROFF・ON>>--- */
40410 *CHR_OFF
40420 sprite 0,MCHR%(0,1),0
40430 return
40440 '
40450 *CHR_ON
40460 sprite 0,MCHR%(0,1),1
40470 return
40480 '
40500 '/* ---<<イベント起動補助>>--- */
40510 *EVENT
40530 TMP = MAP_DATA%(SMAPX,SMAPY)
40540 if TMP <= EVPTN and TMP > HDPTN then gosub *CHK_EVENT
40550 return
40560 '
40600 '/* ---<<スクリーン初期化>>--- */
40610 *INT_SCN
40620 screen@ 1
40630 window ( 0, 0) - (511,255)
40640 view ( 0, 0) - (511,255)
40650 return
40660 '
40700 '/* ---<<CD演奏>>--- */
40710 *CDPLY
40720 if CDBF = 1 then
40730 cdinf CDTMP%
40740 if CDTMP%(1) <> 2 then cd play BGMN%(CDNO)
40740 endif
40750 return
40760 '
40800 '/* ---<<CDリピート>>--- */
40820 *CDREP
40830 if CDBF = 1 then
40840 CDSTAT CDTMP%
40850 if CDTMP%(1) = 0 then gosub *CDPLY
40860 endif
40870 return
40890 '
40900 '/* ---<<CD停止>>--- */
40910 *CDSTOP
40920 if CDBF = 1 then cd stop
40930 return
40940 '
41000 '/* ---<< パステル総合制御 >>--- /*
41010 *FADE_PASTEL
41020 if TYPE = 0 then
41030 for Y = 0 to 175 step 2
41040 line ( 32, 16+Y) - (287, 16+Y),pastel,MJC,b
41050 line ( 32,191-Y) - (287,191-Y),pastel,MJC,b
41060 next Y
41070 else if TYPE = 1 then
41080 for Y = 0 to 239 step 2
41090 line ( 0, Y) - (319, Y),pastel,MJC,b
41100 line ( 0,239-Y) - (319,239-Y),pastel,MJC,b
41110 next Y
41120 endif
41130 pastel 128
41140 TYPE = 0
41150 MJC = 7
41160 return
41170 '
41200 '/* ---<< BEEP-Sound >>--- */
41210 *SND_ATTACK
41220 for I = 300 to 900
41230 beep 363523,1,I
41240 next I
41250 return
41260 '
41300 *SND_HEALING
41310 for I = 600 to 1300 step 2
41320 beep 363523,1, I
41330 next I
41340 return
41350 '
41400 *SND_DAMAGE
41410 for I = 100 to 600
41420 beep 363523,1, I
41430 next I
41440 return
41450 '
41500 *SND_BOOT98
41510 beep 363523,20,1000
41520 wait 10
41530 beep 363523,20, 500
41540 return
41550 '
41600 '/* ---<< HP/MP描画>>--- */
41610 *DRAW_POWER
41620 gosub *DRAW_HP
41630 gosub *DRAW_MP
41640 return
41650 '
41700 '/* ---<< HP/MPメーター消去 >>--- */
41710 *DEL_POWER
41720 line ( 5, 10) - ( 13,189-HP),pset,0,bf
41730 line ( 16, 10) - ( 21,189-MP),pset,0,bf
41740 return
41750 '
41800 '/* ---<< HP描画>>--- */
41810 *DRAW_HP
41820 for I = 0 to HP
41830 line ( 5,189-I) - (13,189-I),pset,[I+76,179-I,0],bf
41840 if SND = 1 then beep 363523,1,1000
41850 next I
41870 return
41890 '
41900 '/* ---<< MP描画>>--- */
41910 *DRAW_MP
41920 for I = 0 to MP
41930 line ( 16,189-I) - (21,189-I),pset,[0,I+76,179-I],bf
41940 if SND = 1 then beep 363523,1,1500
41950 next I
41970 return
41990 '
42000 '/* ---<<キー入力>>--- */
42010 *Key_Input
42020 K$ = ""
42030 while K$ = ""
42040 K$ = input$(1)
42050 wend
42060 return
42070 '
42100 '/* ---<< FMTOWNSIIモード切替 >>--- */
42110 *FASTCHG
42120 if FAST = 1 then
42130 TMP = inp(&H5EC)
42140 if FMODE = 0 then out &H5EC,0 '互換モード
42150 if FMODE = 1 then out &H5EC,1 '高速モード
42160 endif
42170 return
42180 '
42200 '/* ---<< 武器読込 >>--- */
42210 *LOAD_WEPON
42220 load@ sysf$ + WEPONFILE$ , (320, 0)
42230 gosub *TOKA
42240 for WY = 0 to 3
42250 for WX = 0 to 11
42260 OFSET = ST_WPNSPR% + ( WY*12 + WX ) * 4
42270 BX = WX * 16 + 320
42280 BY = WY * 16
42290 gosub *SPRSET_1
42300 next WX
42310 next WY
42320 return
42330 '
42500 '/* ---<<お金と経験値の表示>>--- */
42510 *PUT_EXGLD
42520 MSG$ = "@whLevel:#LV. #GLGold. #EXExp. ▼"
42530 gosub *PUT_MES
42540 return
42550 '
42600 '/* ---<<デバッグモード設定>>--- */
42610 *Debug_ModeSet
42620 if EDIT_ON = 7 then
42630 PT = ptrig(PORT)
42640 if PT = 1 then DBM = 1
42650 if PT = 8 then DBM = 4
42660 if DBM <> 0 then print DBM
42670 endif
42680 return
42690 '
42700 '/* ---<< 戦闘背景表示 >>--- */
42710 *LOAD_BTLBACK
42720 if BKSET = 0 then
42730 load@ sysf$ + BACKBANK$(BACKNO),(320, 0)
42740 get@a (320, 0) - (447, 87),BTLBACK%
42750 BKSET = 1
42760 endif
42770 put@a ( 32, 16) - (159,103),BTLBACK%,pset,2,2
42780 return
42790
42800 '/* ---<< 画面表示 >>--- */
42810 *DISP_MAP
42820 gosub *MBIN_MAP
42830 put@a ( 32, 16) - (287,191),GRP%
42840 OFSET = 0
42850 return
42860 '
42900 '/* ---<<フェード付画面表示>>--- */
42910 *FADE_DISPMAP
42920 gosub *MBIN_MAP
42930 for I = 0 to 175 step 2
42940 put@a ( 32, 16+I) - (287, 16+I),GRP%,,,,, I *256
42950 put@a ( 32,191-I) - (287,191-I),GRP%,,,,,(175-I)*256
42960 next I
42970 return
42980 '
43000 '/* ---<<マップフィールドをメインバッファに転送>>--- */
43010 *MBIN_MAP
43020 gosub *FAST_ON
43030 for Y = 0 to 10
43040 CY = VWMAPY * (MAPY-1) + Y + 1
43050 for X = 0 to 15
43060 CX = VWMAPX * (MAPX-1) + X + 1
43070 put@a (X*16,240) - (X*16+15,255),MAP_PTN%,,,,,256*MAP_DATA%(CX,CY)
43090 next X
43100 get@a ( 0,240) - (255,255),GRP%,Y*4096
43110 next Y
43120 gosub *FAST_OFF
43130 return
43140 '
43150 '/* ---<< マップフィールド転送(縦) >>--- */
43160 *MBIN_MAPSUB
43170 gosub *FAST_ON
43180 for X = 0 to 15
43190 CX = VWMAPX * (MAPX-1) + X + 1
43200 for Y = 0 to 10
43210 CY = VWMAPY * (MAPY-1) + Y + 1
43220 put@a (320,Y*16) - (335,Y*16+15),MAP_PTN%,,,,,256*MAP_DATA%(CX,CY)
43230 next Y
43240 get@a (320, 0) - (327,176),GRP%,X*2816
43250 get@a (328, 0) - (335,176),GRP%,X*2816 + 1408
43260 next X
43270 gosub *FAST_OFF
43280 return
43290 '
43300 '/* ---<< 隠し機能 EUPファイル演奏 >>--- */
43310 *EDTEUP
43320 load@ SYSCFG$(39),EUPMEM%,0
43330 MSG$ = "- EUP再生 -@th" : gosub *PUT_MES
43340 play@ EUPMEM%,1
43350 return
43360 '
43400 '/* ---<<マップ位置補正>>--- */
43410 *SET_MAPPOINT
43420 MAPX = int( SMAPX / VWMAPX ) + 1
43430 if ( SMAPX mod VWMAPX ) = 0 then MAPX = MAPX - 1
43440 MAPY = int( SMAPY / VWMAPY ) + 1
43450 if ( SMAPY mod VWMAPY ) = 0 then MAPY = MAPY - 1
43460 return
43470
43500 '/* ---<< HP&MPを減らす >>--- */
43510 *USE_HPMP
43520 if HP < 0 then HP = 0
43530 if MP < 0 then MP = 0
43560 if HP < 189 then line ( 5, 10) - ( 13,188-HP),pset,[ 0, 0, 50],bf
43570 if MP < 189 then line ( 16, 10) - ( 21,188-MP),pset,[ 0, 0, 50],bf
43580 return
43590 '
43600 '/* ---<<メッセージ表示部消去>>--- */
43610 *INT_MSGWIN
43620 for I = 0 to 155 step 4
43630 put@a ( 4+I,203) - ( 7+I,234),MESW%
43640 put@a (312-I,203) - (315-I,234),MESW%
43650 next I
43660 return
43670 '
43700 '/* ---<< マップパターンを準備する >>--- */
43710 *MAKE_PTN_1
43720 gosub *FAST_ON
43730 load@ sysf$ + FILE$,(320, 0)
43740 I = 1
43750 for Y = 0 to 15
43760 for X = 0 to 11
43770 get@a (X*16+320,Y*16) - (X*16+335,Y*16+15),MAP_PTN%,256*I
43780 I = I + 1
43790 next X
43800 next Y
43810 line (320, 0) - (511,255),pset,0,bf
43820 gosub *FAST_OFF
43830 return
43840 '
43900 '/* ---<< メモリ状態表示 >>--- */
43910 *VIEW_MEMORY
43920 print "このシステムは";SMODE$;"で動作しています."
43930 print using "RESS システムメモリ :########## Bytes 確保しています." ; fre(3)
43940 print using "F-BASIC386メモリ:########## Bytes free." ; fre(1)
43950 print using " 総合 :########## Bytes free." ; fre(4)
43970 print "※FB386メモリが不足すると動作が鈍くなることがあります."
43980 return
43990 '
44000 '/* ---<<メインバッファ格納>>--- */
44010 *MBUF_IN
44020 get@a ( 0, 0) - (319,239),GRP%,OFSET
44030 OFSET = 0
44040 return
44050 '
44100 '/* ---<<メインバッファ表示>>--- */
44110 *MBUF_OUT
44120 put@a ( 0, 0) - (319,239),GRP%,,,,,OFSET
44130 OFSET = 0
44140 return
44150 '
44200 '/* ---<<サブバッファ格納>>--- */
44210 *SBUF_IN
44220 if EXCLAS >= 1 then
44230 get@a ( 0, 0) - (319,239),EXGBF%,OFSET
44240 OFSET = 0
44250 endif
44260 return
44270 '
44300 '/* ---<<サブバッファ表示>>--- */
44310 *SBUF_OUT
44320 if EXCLAS => 1 then
44330 put@a ( 0, 0) - (319,239),EXGBF%,,,,,OFSET
44340 OFSET = 0
44350 endif
44360 return
44370 '
44400 '/* ---<<グラフィックバッファ格納>>--- */
44410 *GBUF_IN
44420 if EXCLAS => 2 then
44430 get@a ( 0, 0) - (319,239),GRPBF%,OFSET
44440 OFSET = 0
44450 endif
44460 return
44470 '
44500 '/* ---<<グラフィックバッファ表示>>--- */
44510 *GBUF_OUT
44520 if EXCLAS => 2 then
44530 put@a ( 0, 0) - (319,239),GRPBF%,,,,,OFSET
44540 OFSET = 0
44550 endif
44560 return
44570 '
44600 '/* ---<< 回転 >> --- */
44610 *EFCT_1
44620 gosub *CHR_OFF
44630 gosub *FADE_2
44640 gosub *EFECTSET
44650 gosub *FADE_7
44660 gosub *CHR_ON
44670 return
44680 '
44700 '/* ---<< モザイク >> --- */
44710 *EFCT_2
44720 gosub *CHR_OFF
44730 gosub *FADE_5
44740 gosub *EFECTSET
44750 gosub *FADE_6
44760 gosub *CHR_ON
44770 return
44780 '
44800 '/* ---<< エフェクト時の定型処理 >>--- */
44810 *EFECTSET
44820 gosub *CG_OFF
44830 gosub *DRW_WAKU
44840 gosub *DISP_MAP
44850 SND = 0
44860 gosub *DRAW_POWER
44870 gosub *MBUF_IN
44880 if EFECT = 2 and EXCLAS => 1 then gosub *SBUF_IN
44890 cls
44900 gosub *CG_ON
44910 TPSET = 0
44920 return
44930 '
44940 '/* 特別フラグ初期化
44950 *INT_SFLG
44960 STRYFLG%(0) = 0
44970 STRYFLG%(1) = 1
44980 return
44990 '
45000 '/* ---<< スプライト表示位置補正 >>--- */
45010 *SET_SPRPOINT
45020 SX = ( SMAPX mod VWMAPX ) * 16
45030 SY = ( SMAPY mod VWMAPY ) * 16
45040 if SX = 0 then SX = VWMAPX * 16 - 16 else SX = SX - 16
45050 if SY = 0 then SY = VWMAPY * 16
45060 sprite 6,MCHR%(0,1),SX-sprite(MCHR%(0,1),6),SY-sprite(MCHR%(0,1),7)
45070 return
45080 '
45100 '/* ---○ マップを切り換える ○---*/
45110 *MAPCHG
45120 gosub *OUT_SJ
45130 gosub *CHR_OFF
45140 gosub *FADE_4
45150 gosub *SET_MAPPOINT
45160 gosub *READ_MAP
45170 gosub *FADE_DISPMAP
45180 gosub *SET_SPRPOINT
45190 gosub *INT_MAINCHR
45200 gosub *CHR_ON
45210 gosub *INT_PAD
45220 return
45230 '
45250 '/* ---○ 指定場所に移動する ○--- */
45260 *MAPMOVE3
45270 gosub *OUT_SJ
45280 gosub *CHR_OFF
45290 gosub *SET_MAPPOINT
45300 gosub *FADE_DISPMAP
45310 gosub *SET_SPRPOINT
45320 gosub *INT_MAINCHR
45330 gosub *CHR_ON
45340 gosub *INT_PAD
45350 return
45360 '
45400 '/* --<< マクロ実行 >>-- */
45410 *RUN_MAC
45420 ENDCOM = 0
45430 for MACS = 1 to MACLINEMAX%( MACNO )
45435 FLGON = 0
45440 CMDL$ = MACSCP$( MACNO , MACS )
45450 gosub *SCP_MAIN
45460 if ENDCOM = 1 then MACS = MACLINEMAX%( MACNO )
45470 next MACS
45475 MACS = 0
45480 ENDCOM = 0
45485 return
45490 '
45500 '/* ---<< フラッシュ >>--- */
45510 *MAGIC_FLASH
45520 for I = 0 to 119 step 2
45530 line (119-I,119-I) - (200+I,120+I),xor,MJC,B
45540 next I
45550 for I = 118 to 0 step -2
45560 line (119-I,119-I) - (200+I,120+I),xor,MJC,B
45570 next I
45580 return
45590 '
45600 *FLASH
45610 if VW = 1 then TX = 32 : TY = 16
45620 line ( TX, TY) - (319-TX,239-TY*3),xor,MJC,bf
45630 line ( TX, TY) - (319-TX,239-TY*3),xor,MJC,bf
45640 MJC = 7
45650 TX = 0
45660 TY = 0
45670 VW = 0
45680 return
45690 '
45700 '/* ---○ BGMコンフィグ読み込み ○--- */
45710 *Sys_BgmSetLoad
45720 if RESSEND = 0 then
45730 FLNO% = 1
45740 open "RESSBGM.CFG" for input as #FLNO%
45750 for I = 1 to 18
45760 input#FLNO%,BGMN%(I)
45770 next I
45780 close #FLNO%
45790 endif
45800 return
45810 '
45840 '/* ---○ オンラインマニュアル File#1 ○--- */
45850 *Sys_Manual_M
45860 FILE$ = SYSCFG$(32)
45870 gosub *VIEWER_TEXT
45880 return
45890 '
46000 '/* ---<< Sprite☆Animater v0.91 >>--- */
46010 *ANIMEG
46020 CR = 0
46030 for I = 1 to 24
46040 if ANMG%(ANO,I,0) = 0 then
46050 I = 24
46060 else
46070 AX = ANMG%(ANO,I,1)
46080 AY = ANMG%(ANO,I,2)
46090 CR = ANMG%(ANO,I,3)
46100 if sprite( CR, 0 ) = 0 then sprite 0,CR,1
46110 sprite time
46120 sprite 1,CR,ANMG%(ANO,I,0)
46130 sprite 6,CR,AX-sprite(CR,6),AY-sprite(CR,7)
46140 endif
46150 if CR = ANMG%( ANO, 1 , 3 ) then wait ANIMEWAIT
46160 next I
46170 return
46180 '
46200 '/* ---<< シンボルマネージャ >>--- */
46210 *COUNT_MSG ' 文字列Byte数カウント
46220 SCODE = 0
46230 MJ = klen( MSG$ )
46240 for JA = 1 to MJ
46250 G$ = kmid$(MSG$,JA,1)
46260 if G$ = "@" then
46270 JA = JA + 2
46280 SCODE = SCODE + 1
46290 endif
46300 if JA = klen( mid$(MSG$ , 1 , 52 + SCODE * 3 ) ) then BCODE = SCODE
46310 next JA
46320 MZ = len(MSG$) - SCODE * 3
46330 return
46340 '
46350 *INS_SYM ' 特殊文字列置換
46360 INSLOOP = 1
46370 OF = 1
46380 while INSLOOP = 1
46390 M = instr( OF , SYM$ , "#" )
46400 if M <> 0 then
46410 TMP$(1) = mid$ ( SYM$ , 1 , M-1 )
46420 TMP$(2) = mid$ ( SYM$ , M+3 )
46430 CODE$ = mid$ ( SYM$ , M , 3 )
46440 if CODE$ = "#NM" then HK$ = NAM$
46450 if CODE$ = "#MS" then HK$ = MSNAME$
46460 if CODE$ = "#GL" then HK$ = str$(GLD)
46470 if CODE$ = "#EX" then HK$ = str$(EX)
46480 if CODE$ = "#LV" then HK$ = str$(LV)
46490 SYM$ = TMP$(1) + HK$ + TMP$(2)
46500 OF = M + 1
46510 else
46520 INSLOOP = 0
46530 endif
46540 wend
46550 return
46560 '
46600 *WRT_SYM ' 文字列表示メイン
46610 MJ = klen(SYM$)
46620 for JA = 1 to MJ
46630 JI$ = kmid$(SYM$,JA,1)
46640 if JI$ = "@" then
46650 CNT$ = kmid$(SYM$,JA,3)
46660 if CNT$ = "@wh" then MJC = 7
46670 if CNT$ = "@ye" then MJC = 6
46680 if CNT$ = "@ci" then MJC = 5
46690 if CNT$ = "@gr" then MJC = 4
46700 if CNT$ = "@mz" then MJC = 3
46710 if CNT$ = "@rd" then MJC = 2
46720 if CNT$ = "@bl" then MJC = 1
46730 if CNT$ = "@st" then STP = 1
46740 if CNT$ = "@th" then STP = 0
46770 if CNT$ = "@it" then SB = 0
46780 if CNT$ = "@ft" then SB = 1
46790 if CNT$ = "@nn" then SB = 2
46800 if CNT$ = "@sd" then SB = 4
46810 if CNT$ = "@fd" then SB = 8
46820 JA = JA + 2
46830 else
46840 symbol (SX,SY),JI$,S!,S!,MJC,,,SB
46850 if KTYPE(JI$,1) = 0 then SX = SX + 6 else SX = SX + 12
46860 endif
46870 next JA
46880 return
46890 '
46900 '/* ---<< 戦闘時/移動時主人公初期化 >>--- */
46910 *INT_BTLSPR
46920 sprite 1,BCHR%(0,1),BNRMPTN%
46930 gosub *SETPS_SPR_SJ
46940 return
46950 '
46960 *INT_MAINCHR
46970 sprite 1,MCHR%(0,1),MCHR%(0,0)
46980 return
46990 '
47000 '/* ---<< Read YSP-Sprite-Data >>--- */
47010 *READ_SPRYSP
47020 if YSPSET = 0 then
47030 FILE$ = YSPFILE$
47040 M$ = "Sprite Reading... "
47050 gosub *READ_YSP
47060 YSPSET = 1
47070 endif
47080 return
47090 '
47100 *READ_YSP
47110 def FNR$(A$) = right$(A$,1) + left$(A$,1) 'Intel形式に変換
47120 FLNO% = 1
47130 gosub *FAST_ON
47140 open "I",#FLNO%, sysf$ + FILE$
47150 gosub *YSP_READ_CHR
47160 gosub *YSP_READ_PAL
47170 gosub *YSP_READ_HOWPTN
47180 gosub *YSP_DEFINE_SPR
47190 close #FLNO%
47200 gosub *FAST_ON
47210 return
47220 '
47230 *YSP_READ_CHR 'キャラクタデータ読込
47240 A$ = input$(2,#FLNO%)
47250 CHS = cvi( FNR$(A$) )
47260 for I = 0 to CHS-1
47270 A$ = input$(8,#FLNO%)
47280 for J = 0 to 3
47290 CH(I,J) = cvi( FNR$( mid$( A$,J*2+1,2 ) ) )
47300 next
47310 next
47320 return
47330 '
47340 *YSP_READ_PAL 'パレットテーブル読込&登録
47350 A$ = input$(2,#FLNO%)
47360 PLT = cvi( FNR$(A$) )
47370 for I = 0 to PLT-1
47380 A$ = input$(32,#FLNO%)
47390 for J = 0 to 15
47400 PL(J) = cvi( FNR$( mid$( A$,J*2+1,2 ) ) )
47410 next
47420 def sprite 2,I,PL
47430 next
47440 return
47450 '
47460 *YSP_READ_HOWPTN 'スプライトパターン読込
47470 A$ = input$(2,#FLNO%)
47480 PTN = cvi( FNR$(A$) )
47490 for I = 0 to PTN-1
47500 locate 0,23 : print using M$ + "###%";(I/PTN)*100
47510 A$ = input$(128,#FLNO%)
47520 for J = 0 to 63
47530 DF(J) = cvi( FNR$( mid$( A$,J*2+1,2 ) ) )
47540 next
47550 def sprite 0,I,DF,0
47560 next
47580 return
47590 '
47600 *YSP_DEFINE_SPR
47610 def sprite 1,MCHR%(0,1),( 0,240),MCHR%(0,0),1,1,0,CH(SPRPAL%(0),3)
47620 def sprite 1,BCHR%(0,1),( 0,240),BCHR%(0,0),2,2,0,CH(SPRPAL%(1),3)
47660 locate 0,23
47670 print M$ + "100%"
47680 return
47690 '
47800 '----
47810 *SETPS_SPR_MONSTER
47820 if MSSIZE = 1 then SX = 32 : SY = 80
47830 if MSSIZE = 2 then SX = 24 : SY = 60
47840 if MSSIZE = 3 then SX = 24 : SY = 16
47850 CR = BCHR%( MSSIZE , 1 )
47870 sprite 6,CR, SX-sprite( CR,6 ),SY-sprite( CR,7 )
47880 return
47890 '
47900 *SETPS_SPR_SJ
47910 sprite 6,BCHR%(0,1),192-sprite(BCHR%(0,1),6),80-sprite(BCHR%(0,1),7)
47920 return
47930 '
47950 '/* ---<< 画面外退避 >>--- */
47960 *OUT_CHR
47970 sprite 6, CR, 320-sprite( CR,6 ), 0-sprite( CR,7 )
47980 return
47990 '
48000 '/* ---○ TEXT VIEWER ○--- */
48010 *VIEWER_TEXT
48020 gosub *INT_PAD
48030 if EXCLAS => 1 then gosub *SBUF_IN
48040 MJC = 0
48050 TYPE = 1
48060 gosub *FADE_PASTEL
48070 FLNO% = 1
48080 gosub *MBUF_IN
48090 open sysf$ + FILE$ for input as #FLNO%
48100 A_LOOP = 1
48110 while A_LOOP = 1
48120 B_LOOP = 1
48130 T = -1
48140 gosub *MBUF_OUT
48150 while B_LOOP = 1
48160 T = T + 1
48170 input#FLNO%,TEXTTMP$(T)
48180 if eof(FLNO%) = -1 then A_LOOP = 0
48190 if T = 20 then B_LOOP = 0
48200 if A_LOOP = 0 then B_LOOP = 0
48210 wend
48220 TE_MAX = T
48230 for I = 0 to TE_MAX
48240 SX = 0 : SY = I * 15 : SYM$ = TEXTTMP$(I) : gosub *WRT_SYM
48250 next I
48260 PADSET = 5
48270 gosub *WAIT_PAD
48280 wend
48290 close #FLNO%
48300 if EXCLAS => 1 then
48310 gosub *SBUF_OUT
48320 else
48330 gosub *DRAW_WAKU
48340 gosub *DISP_MAP
48360 endif
48370 TPSET = 0
48380 return
48390 '
48400 '/* ---<<敵から逃げる>>--- */
48410 *ESCAPE
48420 MSG$ = "#NMは逃げ出した! ▼" : gosub *PUT_MES
48430 if LV > MSLV + 2 then
48440 MSA = 3
48450 else
48460 TMP = int ( RND * 3 ) + 1
48470 if TMP = 1 then
48480 if BOSS <> 1 then MSA = 3
48490 else
48500 MSG$ = "しかし失敗してしまった! ▼" : gosub *PUT_MES
48510 endif
48520 endif
48530 return
48540 '
48550 '/* ---<< 画面外退避 >>--- */
48560 *OUT_SJ
48570 CR = MCHR%(0,1) : gosub *OUT_CHR
48580 return
48590 '
48600 '/* ---<< 戦闘サブ >>--- */
48610 *NO_MGC
48620 MSG$ = "@yeMPが不足していて効果がありません!▼@st"
48630 gosub *PUT_MES
48640 return
48650 *NO_DAMAGE
48660 MSG$ = "@mzしかし敵を傷つけることができなかった!▼@st"
48670 gosub *PUT_MES
48680 return
48690 '
48700 *ATTACK_DAMAGE
48710 if DM > 0 then
48720 MSHP = MSHP - DM
48730 if MSHP <= 0 then MSA = 0
48740 MSG$ = "@wh#MSに" + str$(DM) + "のダメージを与えた! ▼"
48750 gosub *PUT_MES
48760 else
48770 gosub *NO_DAMAGE
48780 endif
48790 return
48800 '
48810 *LOAD_BOSS
48820 FLNO% = 2
48830 open sysf$ + BOSFILE$ for input as #FLNO%
48840 input#FLNO%, MSNAME$, MSMXHP ,MSDFP
48850 input#FLNO%, MSEXP , MSGLD ,CLJ , MSTIF$ , MSSIZE , BKTIF$
48860 for I = 1 to 6
48870 input#FLNO%,BSWPN$(I),BSWPP%(I)
48880 next I
48890 input#FLNO%,MEX
48900 for I = 1 to MEX
48910 input#FLNO%,BSMES$(I)
48920 next I
48970 close #FLNO%
48980 return
48990 '
49000 '/* ---<<スプライトキャラクタフィールド移動>>--- */
49010 *CHR_UP
49020 for J = 1 to 2
49030 for I = 1 to 8
49040 sprite 6, MMV_CHR ,0,-1
49050 wait MOVEWAIT
49060 next I
49070 if J = 1 then sprite 1, MCHR%(0,1), MCHR%(0,0) + 3 * SPRCLR
49080 if J = 2 then sprite 1, MCHR%(0,1), MCHR%(0,0) + 2 * SPRCLR
49090 next J
49100 return
49110 '
49150 *CHR_RIGHT
49160 for J = 1 to 2
49170 for I = 1 to 8
49180 sprite 6, MMV_CHR ,1,0
49190 wait MOVEWAIT
49200 next I
49210 if J = 1 then sprite 1,MCHR%(0,1),MCHR%(0,0) + 7 * SPRCLR
49220 if J = 2 then sprite 1,MCHR%(0,1),MCHR%(0,0) + 6 * SPRCLR
49230 next J
49240 return
49250 '
49300 *CHR_DOWN
49310 for J = 1 to 2
49320 for I = 1 to 8
49330 sprite 6, MMV_CHR ,0,1
49340 wait MOVEWAIT
49350 next I
49360 if J = 1 then sprite 1,MCHR%(0,1),MCHR%(0,0) + 1 * SPRCLR
49370 if J = 2 then sprite 1,MCHR%(0,1),MCHR%(0,0) + 0 * SPRCLR
49380 next J
49390 return
49400 '
49450 *CHR_LEFT
49460 for J = 1 to 2
49470 for I = 1 to 8
49480 sprite 6, MMV_CHR ,-1,0
49490 wait MOVEWAIT
49500 next I
49510 if J = 1 then sprite 1,MCHR%(0,1),MCHR%(0,0) + 5 * SPRCLR
49520 if J = 2 then sprite 1,MCHR%(0,1),MCHR%(0,0) + 4 * SPRCLR
49530 next J
49540 return
49550 '
49600 '/* ---<< モンスター点滅→やられる >>--- */
49610 *DIE_MONSTER
49620 for I = 0 to 11
49630 sprite time
49640 sprite 0,BCHR%(MSSIZE,1),1
49650 wait BRNKWAIT
49660 sprite 0,BCHR%(MSSIZE,1),0
49670 wait BRNKWAIT
49680 next I
49690 return
49700 '
50000 '+--====================--+
50010 '|○ システムコンフィグファイル読込 ○|
50020 '|○ File #4 ○|
50030 '+--====================--+
50040 *Sys_ConfigLoad
50050 if RESSEND = 0 then
50060 gosub *LOAD_RESSCFG
50070 if EREND <> 1 then gosub *SET_MAINCFG
50080 endif
50090 return
50100 '
50110 *LOAD_RESSCFG
50120 print "- RESS Configration -
50130 FLNO% = 4
50140 open "RESS.CFG" for input as #FLNO%
50150 CFGEND = 0
50160 while CFGEND = 0
50170 SYSSET = 0
50180 while SYSSET = 0
50190 input#FLNO%,SYSID$
50200 if mid$( SYSID$,1,1 ) <> "#" then SYSSET = 1
50210 wend
50220 input#FLNO%,SYSDT$
50230 syscfg$( val(SYSID$) ) = SYSDT$
50240 if syscfg$(99) = "EOF" or syscfg$(99) = "eof" then CFGEND = 1
50250 wend
50260 close #FLNO%
50270 if syscfg$(1) <> SVER$ then EREND = 1
50280 return
50290 '
50300 *SET_MAINCFG
50310 CPU$ = syscfg$( 2)
50320 EDIT_ON = val( syscfg$( 3) )
50330 MSGW_SPC$ = syscfg$( 6)
50340 START_MSG$ = syscfg$( 7)
50350 EUPSIZE = val( syscfg$( 8) )
50360 sysf$ = syscfg$(10)
50370 savef$ = syscfg$(11)
50380 stryf$ = syscfg$(12)
50390 euplib$ = syscfg$(13)
50400 CDBF = val( syscfg$(14) )
50410 SCAN = val( syscfg$(15) )
50420 NAM$ = syscfg$(16)
50430 FAST = val( syscfg$(17) )
50440 HDWAIT = val( syscfg$(18) )
50450 PADSND = val( syscfg$(19) )
50460 YSPFILE$ = syscfg$(21)
50470 ITMFILE$ = syscfg$(22)
50480 WAKUFILE$ = syscfg$(23)
50490 MACFILE$ = syscfg$(27)
50500 DEAD_MES$ = syscfg$(29)
50510 KCLSPD = val( syscfg$(34) )
50520 SCRL = val( syscfg$(36) )
50530 PORT = val( syscfg$(37) )
50540 MCHR%(0,1) = val( syscfg$(40) )
50550 MCHR%(0,0) = val( syscfg$(41) )
50560 BCHR%(0,1) = val( syscfg$(42) )
50570 BNRMPTN% = val( syscfg$(43) )
50580 BWINPTN% = val( syscfg$(44) )
50590 BDMGPTN% = val( syscfg$(45) )
50600 BDIEPTN% = val( syscfg$(46) )
50610 BCHR%(1,1) = val( syscfg$(47) )
50620 BCHR%(2,1) = val( syscfg$(48) )
50630 BCHR%(3,1) = val( syscfg$(49) )
50640 WPNCHR_ST% = val( syscfg$(50) )
50650 ST_WPNSPR% = val( syscfg$(53) )
50660 ST_MS1SPR% = val( syscfg$(54) )
50670 ST_MS2SPR% = val( syscfg$(55) )
50680 ST_MS3SPR% = val( syscfg$(56) )
50690 ST_LSSSPR% = val( syscfg$(57) )
50700 WEPONFILE$ = syscfg$(58)
50710 SPRPAL%(0) = val( syscfg$(59) )
50715 SPRPAL%(1) = val( syscfg$(60) )
50720 FLDMAC = val( syscfg$(65) )
50730 ZKBMAC = val( syscfg$(66) )
50740 BSBMAC = val( syscfg$(67) )
50750 LDNMAC = val( syscfg$(68) )
50760 SVNMAC = val( syscfg$(69) )
50770 for I = 0 to 5
50780 BACKBANK$(I) = SYSCFG$( 70+I ) '戦闘背景設定
50790 next I
50800 for I = 0 to 7
50810 PTNBANK$(I) = SYSCFG$( 80+I ) 'パターンファイル設定
50820 next I
50830 MOVEWAIT = val( syscfg$(90) )
50840 ANIMEWAIT = val( syscfg$(91) )
50850 BRNKWAIT = val( syscfg$(92) )
50860 PADWAIT = val( syscfg$(93) )
50870 SYSWAIT = val( syscfg$(94) )
50880 BCHR%(0,0) = BNRMPTN%
50890 MMV_CHR% = MCHR%(0,1)
50900 for I = 0 to 63
50910 WPNCHR%(I) = WPNCHR_ST% + I
50920 next I
50930 print "システムファイルパスは ";sysf$ ;" に設定されています."
50940 print "ノート記録パスは ";savef$;" に設定されています."
50950 print "ストーリーデータパスは ";stryf$;" に設定されています."
50960 if CDBF = 0 then print "現在CD制御は無効です."
50970 print "BGMバッファを";EUPSIZE;"K Bytes確保しました."
50980 return
50990 '
51000 '####################################################
51010 '●モザイクルーチン
51020 ' このルーチンは藤本雅也氏の作品が
51030 ' 「◎h!FMTOWNS1993/7月号」に掲載されたものです。
51050 '####################################################
51060 *MOZAIC
51070 ZB!=1/Z:BX=320*ZB!:BY=240*ZB!
51080 PUT@A(320,0)-(639,239),EXGBF%,PSET,ZB!,ZB!
51090 PASTEL 20+Z*7
51100 IF Z>4 THEN LINE(320,0)-(320+BX-1,BY-1),PASTEL,0,BF
51110 GET@A(320,0)-(320+BX-1,BY-1),GRP%
51120 PUT@A(0,0)-(BX-1,BY-1),GRP%,PSET,Z,Z
51130 return
51140 '
51200 '###################################################################
51210 ' スプライト画面モード 変更ルーチン *SCRN_CHANGE
51220 ' [SCRN_MODE=スクリーンモード(SCREEN@0時は0/SCREEN@1時は1)]
51230 ' [SCRN_X=X座標表示位置(ドット単位)]
51240 '###################################################################
51250 *SCRN_CHANGE
51260 IF SCRN_MODE=0 THEN RESTORE *SCRN_DATA0
51270 IF SCRN_MODE=1 THEN RESTORE *SCRN_DATA1
51280 READ SCRN_AD,SCRN_DT$
51290 WHILE SCRN_AD<>99
51300 OUT &H440,SCRN_AD,2
51310 OUT &H442,VAL("&H"+SCRN_DT$),2
51320 READ SCRN_AD,SCRN_DT$
51330 WEND
51340 OUT &H440,11,2:OUT &H442,&H008A+SCRN_X*2,2
51350 OUT &H440,12,2:OUT &H442,&H028A+SCRN_X*2,2
51360 OUT &H440,22,2:OUT &H442,&H008A+SCRN_X*2,2
51370 RETURN
51380 '===================================================================
51490 *SCRN_DATA0'---------------------------------------------------
51400 DATA 16,0406, 27,1100, 99,****
51410 *SCRN_DATA1'---------------------------------------------------
51420 DATA 00,0060, 01,02C0, 04,031F, 05,0000, 06,0004, 07,0000
51430 DATA 08,0419, 09,008A, 10,030A, 13,0046, 14,0406, 15,0046
51440 DATA 16,0406, 18,008A, 25,0058, 26,0000, 27,1111, 29,0002
51450 DATA 30,0000, 31,0192, 99,****
51460 '###################################################################
51500 '-----------------------------------------------------
51510 '/* ---<< 32kスプライト登録補助 >>--- */
51550 *TOKA
51560 get@ (320, 0) - (511,255),GRP%, [ 0, 0, 0]
51570 put@ (320, 0) - (511,255),GRP%,or,[ 0, 0, 0,1]
51580 return
51590 '
51600 *SPRSET_1
51610 get@a ( BX, BY) - (BX+15,BY+15),TMPPTN%
51630 def sprite 0,OFSET,TMPPTN%,1
51640 OFSET = 0
51650 return
51660 '
51700 *SPRSET_4
51710 for PY = 0 to 1
51720 for PX = 0 to 1
51730 get@a (PX*16+BX,PY*16+BY) - (PX*16+BX+15,PY*16+BY+15),TMPPTN%
51735 print
51740 def sprite 0, OFSET + PY*8 + PX*4 ,TMPPTN%,1
51750 next PX
51760 next PY
51770 OFSET = 0
51780 return
51790 '
51800 *SPRSET_16
51810 for PY = 0 to 3
51820 for PX = 0 to 3
51830 get@a (PX*16+BX,PY*16+BY) - (PX*16+BX+15,PY*16+BY+15),TMPPTN%
51840 def sprite 0,OFSET + PY*16 + PX*4,TMPPTN%,1
51850 next PX
51860 next PY
51870 OFSET = 0
51880 return
51890 '
51900 *SPRSET_81
51910 for PY = 0 to 8
51920 for PX = 0 to 8
51930 get@a (PX*16+BX,PY*16+BY) - (PX*16+BX+15,PY*16+BY+15),TMPPTN%
51940 def sprite 0,OFSET + PY*36 + PX*4 , TMPPTN%,1
51950 next PX
51960 next PY
51970 OFSET = 0
51980 return
51990 '
52000 '+---==============---+
52010 '|○ スプライト設定 ○|
52020 '|○ ○|
52030 '+---==============---+
52040 *SET_SPR_WEPON
52050 if RESSEND = 0 then
52060 gosub *LOAD_WEPON
52070 for I = 0 to 63
52080 def sprite 1,WPNCHR%(I),(32, 80),ST_WPNSPR%,1,1,0
52090 next I
52100 endif
52110 OFSET = 0
52120 return
52130 '
53500 '+----------------------------------+
53510 '|○ デバッグ用メモリ表示ルーチン ○|
53520 '|○ ○|
53530 '+--==============================--+
53540 *Debug_MemoryView
53550 sprite off
53560 screen@ 0
53570 color 7,0,7,4
53580 if DBM <> 0 then
53590 print "---------☆デバッグルーチンだよん♪☆---------"
53600 print "正常に終了したよ~な感じです(^^;)
53610 print "今のメモリの使用状況を表示しま~すっ(^^;)"
53620 gosub *VIEW_MEMORY
53660 print "-<< パッドを押すと終了しちゃいます(^^;) >>-"
53670 PADSET = 0
53680 gosub *WAIT_PAD
53690 endif
53700 print "終了しました。またどうぞ♪"
53710 gosub *CDSTOP
53720 play off
53730 return
53740 '
53800 '/* ---<<コンフィグのバージョンが違う場合>>--- */
53810 *Sys_CFGERR
53820 if EREND = 1 then
53830 color 7,0,7,4
53840 beep 1
53850 print "!!RESSコンフィグのバージョンが違います!!"
53860 print "--------------<<緊急終了します>>----------------"
53870 print "パッドのボタンを押してください."
53880 PADSET = 0
53890 PADSND = 0
53900 gosub *WAIT_PAD
53910 beep 0
53920 end
53930 endif
53940 return
53950 '
54000 '+---==================================================---+
54010 '|○ スクリプトモジュール ライトセイバー ver.0.91 #06 File #4 ○|
54030 '+---==================================================---+
54040 *SCRPT_RUN
54060 FILE$ = stryf$ + SCPFILE$
54070 FLNSC% = 4
54080 gosub *INT_SFLG
54090 gosub *READ_SCPFILE
54100 ENDCOM = 0
54110 SCP_LOOP = 1
54120 SCP_LINE = 1
54140 while SCP_LOOP = 1
54150 CMDL$ = SCRPT$( SCP_LINE )
54160 FLGON = SCPFLG%( SCP_LINE )
54170 TMM$ = mid$( CMDL$,1,1 )
54180 if TMM$ <> "#" and TMM$ <> "*" then gosub *SCP_MAIN
54190 SCP_LINE = SCP_LINE + 1
54200 if SCP_LINE > SCP_MAX then SCP_LOOP = 0
54210 if ENDS <> 0 then ENDCOM = 1
54220 if ENDCOM <> 0 then SCP_LOOP = 0
54230 wend
54240 SCP_LOOP = 0
54250 MEST = 0
54280 return
54290 '
54300 *READ_SCPFILE
54320 open FILE$ for input as #FLNSC%
54330 READLOOP = 1
54340 SCP_LINE = 1
54350 while READLOOP = 1
54360 input#FLNSC%, TMP$
54370 TMM$ = mid$( TMP$, 1, 1 )
54380 if TMM$ = "#" or TMM$ = "*" then TMP% = 0 else input#FLNSC%,TMP%
54390 SCRPT$(SCP_LINE) = TMP$
54400 SCPFLG%(SCP_LINE) = TMP%
54410 if eof(FLNSC%) = -1 or TMP$ = "EOF" then
54420 READLOOP = 0
54430 SCP_MAX = SCP_LINE
54440 endif
54450 SCP_LINE = SCP_LINE + 1
54460 wend
54470 close #FLNSC%
54480 return
54490 '
54500 '----------------------------------
54510 *SCP_MAIN
54520 on error goto *ERR_SCP
54530 gosub *INT_SFLG
54540 CMDN$ = mid$( CMDL$ , 1 , 6 )
54550 if STRYFLG%(FLGON) = 1 then
54560 if CMDN$ = "ENDFON" then ENDCOM = 1
54570 if CMDN$ = "GOLFON" then
54580 TMP = val( mid$( CMDL$ , 8 ) )
54590 SCP_LINE = TMP - 1
54600 endif
54630 else if STRYFLG%(FLGON) = 0 then
54640 if CMDN$ = "CDSTOP" then gosub *CDSTOP 'CD停止
54650 if CMDN$ = "CDREPT" then gosub *CDREP 'CDリピート
54660 if CMDN$ = "ZAKOBT" then gosub *BATTLE 'ランダム戦闘
54670 if CMDN$ = "REDRAW" then gosub *DISP_MAP 'フィールド表示
54680 if CMDN$ = "FREDRW" then gosub *FADE_DISPMAP
54690 if CMDN$ = "WAKULD" then gosub *DRW_WAKU '枠表示
54700 if CMDN$ = "PLSTOP" then play stop '演奏停止
54710 if CMDN$ = "BACKLD" then gosub *LOAD_BTLBACK
54720 if CMDN$ = "ALLEND" then ENDS = 1 'ゲーム終了
54730 if CMDN$ = "SCPEND" then ENDCOM = 1 'スクリプト終了
54740 if CMDN$ = "INTPAD" then gosub *INT_PAD
54750 if CMDN$ = "RESERV" then gosub *RESVD 'リザーブド
54760 if CMDN$ = "PDWAIT" then gosub *PAD_WAIT 'パッド入力待ち
54770 if CMDN$ = "EPOWER" then gosub *DEL_POWER ' HP/MPメータ消去
54780 if CMDN$ = "DPOWER" then gosub *DRAW_POWER ' HP/MPメータ描画
54790 if CMDN$ = "FASTON" then gosub *FAST_ON
54800 if CMDN$ = "FASTOF" then gosub *FAST_OFF
54810 if CMDN$ = "PUTSTS" then gosub *Main_Puts_States
54820 if CMDN$ = "MANUAL" then gosub *Sys_Manual_M
54830 if CMDN$ = "BTTLON" then MNSON = 1
54840 if CMDN$ = "BTTLOF" then MNSON = 0
54850 if CMDN$ = "BSPRIT" and ANIMESET = 1 then gosub *INT_BTLSPR
54860 if CMDN$ = "INTMSG" then MSG$ = "" : gosub *PUT_MES
54870 if CMDN$ = "ANIMOF" then ANIMESET = 0
54880 if CMDN$ = "ANIMON" then ANIMESET = 1
54890 if CMDN$ = "ESCAPE" then gosub *ESCAPE
54900 if CMDN$ = "MSTSEL" then gosub *MST_SEL
54910 if CMDN$ = "BOSSLD" then gosub *LOAD_BOSS
54920 if CMDN$ = "BF_INM" then gosub *MBUF_IN
54930 if CMDN$ = "BFOUTM" then gosub *MBUF_OUT
54990 '
55000 '/* フラグ変更 { FLGSET OFF 001 , 0 } */
55010 if CMDN$ = "FLGSET" then
55020 NO = val ( mid$( CMDL$ , 12 , 3 ) )
55030 if mid$( CMDL$ , 8 , 3 ) = "OFF" then
55040 STRYFLG%(NO) = 0
55050 else if mid$( CMDL$ , 8 , 3 ) = "ON_" then
55060 STRYFLG%(NO) = 1
55070 endif
55080 endif
55090 '
55100 '/* マップ内画面移動 { DSPCHG 01 01 1 , 0 } */
55110 if CMDN$ = "DSPCHG" then
55120 SMAPX = val ( mid$( CMDL$ , 8 , 2 ) )
55130 SMAPY = val ( mid$( CMDL$ , 11 , 2 ) )
55140 MSGFG = val ( mid$( CMDL$ , 14 , 1 ) )
55150 gosub *MAPMOVE3
55160 if MSGFG <> 0 then MSG$ = "" : gosub *PUT_MES
55170 endif
55180 '
55200 '/* マップ変更 { MAPCHG 01 01 01 1 , 0 } */
55210 if CMDN$ = "MAPCHG" then
55220 ALMAPS = val ( mid$( CMDL$ , 8 , 2 ) )
55230 SMAPX = val ( mid$( CMDL$ , 11 , 2 ) )
55240 SMAPY = val ( mid$( CMDL$ , 14 , 2 ) )
55250 MSGFG = val ( mid$( CMDL$ , 17 , 1 ) )
55260 gosub *MAPCHG
55270 if MSGFG <> 0 then MSG$ = "" : gosub *PUT_MES
55280 endif
55290 '
55300 '/* CD演奏 { CDPLAY 10 , 0 } */
55310 if CMDN$ = "CDPLAY" then
55320 CDNO = val ( mid$ ( CMDL$ , 8 , 2 ) )
55330 gosub *CDPLY
55340 endif
55350 '
55400 '/* TIFFファイル表示 { TIFFLD (000/000) FILE.TIF , 0 } */
55410 if CMDN$ = "TIFFLD" then
55420 CX = val ( mid$ ( CMDL$ , 9 , 3 ) )
55430 CY = val ( mid$ ( CMDL$ , 13 , 3 ) )
55440 FILE$ = mid$ ( CMDL$ , 18 , 12 )
55460 load@ sysf$ + FILE$ , (CX,CY)
55470 endif
55480 '
55500 '/* 文字表示 { MWRITE 1 7 0 文字ぃ☆ , 0 } */
55510 if CMDN$ = "MWRITE" then
55540 MEST = val ( mid$ ( CMDL$ , 8 , 1 ) )
55550 MSG$ = mid$ ( CMDL$ , 10 )
55560 gosub *PUT_MES
55570 MEST = 0
55580 endif
55590 '
55600 '/* 文字を自由な場所に表示する */
55610 '/* { SYMBOL (000/000) 7 01 文字☆ , 0 } */
55620 if CMDN$ = "SYMBOL" then
55630 SX = val ( mid$ ( CMDL$ , 9 , 3 ) )
55640 SY = val ( mid$ ( CMDL$ , 13 , 3 ) )
55680 SYM$ = mid$ ( CMDL$ , 35 )
55690 if FTSZ = 16 then def font "システム 16ドット"
55700 if FTSZ <> 16 then def font "システム 12ドット"
55710 gosub *WRT_SYM
55720 endif
55730 '
55740 '/* MNUSET { MNUSET (000/000) , 0 } */
55750 if CMDN$ = "MNUSET" then
55760 MX = val ( mid$ ( CMDL$ , 9 , 3 ) )
55770 MY = val ( mid$ ( CMDL$ , 13 , 3 ) )
55780 endif
55790 '
55800 '/* エフェクト { EFFECT 1 7 , 0 } */
55810 if CMDN$ = "EFFECT" then
55820 FF = val ( mid$ ( CMDL$ , 8 , 1 ) )
55830 MJC = val ( mid$ ( CMDL$ , 10 , 1 ) )
55840 on FF gosub *FADE_1 ,*FADE_2 ,*FADE_3 ,*FADE_4 ,*FADE_5
55850 if FF => 6 then
55860 on FF-5 gosub *FADE_6 ,*FADE_7 ,*FADE_8 ,*FADE_9 ,*fade_10
55870 endif
55880 endif
55890 '
55900 '/* スクリプトファイル読込
55910 if CMDN$ = "SCPRUN" then
55920 if MACS = 0 then
55930 SCPFILE$ = mid$( CMDN$ , 8 , 12 )
55940 SCP_LINE = 0
55950 gosub *READ_SCPFILE
55960 if SCP_LOOP = 0 then gosub *SCP_MAIN
55970 endif
55980 endif
55990 '
56000 '/* タイミング待ち { WAITES 1 1 , 0 } */
56010 if CMDN$ = "WAITES" then
56020 TMP = val ( mid$ ( CMDL$ , 8 , 1 ) )
56030 F = val ( mid$ ( CMDL$ , 10 , 3 ) )
56040 wait F
56050 endif
56060 '
56100 '/* マップパターン書き換え { CHGPTN 01 01 001 , 0 } */
56110 if CMDN$ = "CHGPTN" then
56120 X = val ( mid$ ( CMDL$ , 8 , 2 ) )
56130 Y = val ( mid$ ( CMDL$ , 11 , 2 ) )
56140 CHG= val ( mid$ ( CMDL$ , 14 , 3 ) )
56150 MAP_DATA(X,Y) = CHG
56160 endif
56170 '
56200 '/* EUPファイルを演奏する { EUPPLY 0 1 FILE.EUP , 0 } */
56210 if CMDN$ = "EUPPLY" then
56220 TMP = val ( mid$ ( CMDL$ , 8 , 1 ) )
56230 LOOP = val ( mid$ ( CMDL$ , 10 , 1 ) )
56240 FILE$ = mid$ ( CMDL$ , 12 )
56250 load@ sysf$ + FILE$ , EUPMEM% , TMP
56260 play@ EUPMEM% , LOOP
56270 endif
56280 '
56300 '/* 画面を消す { CLRSCN 1 , 0 } */
56310 if CMDN$ = "CLRSCN" then
56320 TMP = val ( mid$ ( CMDL$ , 8 , 1 ) )
56330 if TMP = 0 then line ( 0, 0) - (319,239),pset,0,bf
56340 if TMP = 1 then line ( 32, 16) - (287,191),pset,0,bf
56350 endif
56360 '
56370 '/* PMBファイルのPCMサウンドを鳴らす { PMBSND 01 001 , 0 }*/
56380 if CMDN$ = "PMBSND" then
56390 NEIRO = val ( mid$ ( CMDL$ , 8 , 2 ) )
56400 NAGASA = val ( mid$ ( CMDL$ , 11 , 2 ) )
56410 CH = 14 - 1
56420 outm #255 , &HC0 + CH , &H00 + NEIRO
56430 outm #255 , &HB0 + CH , &H0A , &H40
56440 outm #255 , &HB0 + CH , &H07 , &H7F
56450 outm #255 , &H90 + CH , 60 , 127
56460 wait NAGASA
56470 outm #255 , &H90 + CH,60,0
56480 endif
56490 '
56500 '/* 画面に霧をかける { MYSTEF 1 7 128 , 0 } */
56510 if CMDN$ = "MYSTEF" then
56520 TYPE = val ( mid$ ( CMDL$ , 8 , 1 ) )
56530 MJC = val ( mid$ ( CMDL$ , 10 , 1 ) )
56540 PST = val ( mid$ ( CMDL$ , 12 , 3 ) )
56550 pastel PST
56560 gosub *FADE_PASTEL
56570 endif
56580 '
56600 '/* ANIMEG { ANIMEG 01 ,0 }
56610 if CMDN$ = "ANIMEG" then
56620 if ANIMESET = 1 then
56630 ANO = val ( mid$( CMDL$ , 8 , 2 ) )
56640 gosub *ANIMEG
56650 endif
56670 endif
56680 '
56700 '/* マップパターンファイル読込 { RSTPTN 01 } */
56710 if CMDN$ = "RSTPTN" then
56720 OLDPTN = PTNNUM
56730 PTNNUM = val ( mid$ ( CMDL$ , 8 , 2 ) )
56740 gosub *RESET_PTN
56750 endif
56760 '
56800 '/* HP/MP回復 { UPHPMP 010 010 7 , 0 } */
56810 if CMDN$ = "UPHPMP" then
56820 HP = HP + val ( mid$ ( CMDL$ , 8 , 3 ) )
56830 MP = MP + val ( mid$ ( CMDL$ , 12 , 3 ) )
56840 if HP => MAXHP then HP = MAXHP
56850 if MP => MAXMP then MP = MAXMP
56860 SND = 1
56870 gosub *DRAW_POWER
56880 endif
56890 '
56900 '/* Exit確認 */
56910 if CMDN$ = "ENDCHK" then
56920 MSG$ = "終了してよろしいですか? @gr[A]:OK!"
56930 gosub *PUT_MES
56940 if PT = 1 then ENDS = 1
56960 endif
56970 '
57000 '/* SAVE NOTE */
57010 if CMDN$ = "SAVENT" then
57020 MSG$ = "記録してよろしいですか? @gr[A]:OK!"
57030 gosub *PUT_MES
57040 if PT = 1 then gosub *NOTESAVE_1
57050 endif
57060 '
57100 '/* READ NOTE */
57110 if CMDN$ = "READNT" then
57120 MSG$="現在のデータを破棄してよろしいですか? @gr[A]:OK!"
57130 gosub *PUT_MES
57140 if PT = 1 then gosub *FILELOAD_1
57150 endif
57160 '
57200 '/* ノーマル ボス戦闘 { BOSBTL BOSS001.RSS , 0 } */
57210 if CMDN$ = "BOSBTL" then
57220 BOSFILE$ = mid$ ( CMDL$ , 8 )
57230 gosub *NBOSBTL
57240 endif
57250 '
57300 '/* ザコ戦闘(敵指定可) { ZAKOAT 01 , 0 } */
57310 'if CMDN$ = "ZAKOAT" then
57320 ' ZST = val( mid$( CMDL$ , 8 , 2 ) )
57330 ' gosub *BATTLE
57340 ' ZST = 0
57350 'endif
57360 '
57400 '/* GOLINE(分岐命令) { GOLINE 001 , 0 } */
57410 if CMDN$ = "GOLINE" then
57420 TMP = val( mid$( CMDL$ , 8 ) )
57430 SCP_LINE = TMP - 1
57440 endif
57450 '
57500 '/* GETGLD(資金増) { GETGLD +00220 , 0 } */
57510 if CMDN$ = "GETGLD" then
57520 TMP = val( mid$(CMDL$ , 8 ,6 ) )
57530 GLD = GLD + TMP
57540 endif
57550 '
57600 '/* VWTEXT(テキスト表示) { VWTEXT FILE.TXT ,0 }
57610 if CMDN$ = "VWTEXT" then
57620 FILE$ = mid$( CMDL$ , 8 , 12 )
57630 gosub *VIEWER_TEXT
57640 endif
57650 '
57700 '/* フラッシュ { FLASHE 1 7 ,0}
57710 if CMDN$ = "FLASHE" then
57720 TYPE = val( mid$( CMDL$ , 8, 1 ) )
57730 MJC = val( mid$( CMDL$ , 10, 1 ) )
57740 VW = 1
57750 on TYPE gosub *FLASH,*MAGIC_FLASH
57760 endif
57770 '
57800 '/* BEEP-Sound */
57810 if CMDN$ = "BEEPSD" then
57820 BEEP 1
57830 TYPE = val ( mid$( CMDL$ , 8 , 1 ) )
57840 on type gosub *SND_ATTACK,*SND_HEALING,*SND_DAMAGE,*SND_BOOT98
57850 endif
57860 '
57900 '/* マクロ実行 */
57910 if CMDN$ = "MACRUN" then
57940 MACTMP$ = CMDL$
57950 MACNO = val( mid$( CMDL$, 8 , 3 ) )
57960 gosub *RUN_MAC
57970 CMDL$ = MACTMP$
57980 endif
57990 '
58000 '/* 攻撃/回復数値処理 { HMPSET 1 1 1 1 , 0 }
58010 if CMDN$ = "HMPSET" then
58020 TYPE = val( mid$( CMDL$ , 8 , 1 ) )
58030 MFL = val( mid$( CMDL$ , 10 , 1 ) )
58040 BAI = val( mid$( CMDL$ , 12 , 1 ) )
58050 SPE = val( mid$( CMDL$ , 14 , 1 ) )
58100 if TYPE = 0 then
58110 PP = int ( RND * 5 ) + WPN * PWR
58120 DM = PP - MSDFP
58130 if int( rnd * 10 ) + 1 => 10 then
58140 DM = ( rnd + 1 ) * DM
58150 MJC = 2
58160 gosub *FLASH
58170 MSG$ = "@gr攻撃が敵の弱点に命中した!"
58180 gosub *PUT_MES
58190 endif
58200 gosub *ATTACK_DAMAGE
58210 else if TYPE = 1 then
58220 if MP => SPE then
58230 PP = int ( RND * 5 ) + BAI * MGC
58240 DM = PP - MSDFP
58250 if MFL = CLJ then DM = ( rnd + 1 ) * DM
58260 gosub *ATTACK_DAMAGE
58270 MP = MP - SPE
58280 gosub *USE_HPMP
58290 else
58300 gosub *NO_MGC
58310 endif
58320 else if TYPE = 2 then
58330 if MP => SPE then
58340 PP = int ( RND * 10 )+ int ( BAI * MGC / 2 )
58350 MSG$ = "@grHPが" + str$( PP ) + "回復した! ▼@st"
58360 gosub *PUT_MES
58370 HP = HP + PP
58380 if HP => MAXHP then HP = MAXHP
58390 MP = MP - SPE
58400 if MP <= 0 then MP = 0
58410 SND = 1
58420 gosub *DRAW_HP
58430 gosub *USE_HPMP
58440 else
58450 gosub *NO_MGC
58460 endif
58470 else if TYPE = 9 then
58480 sprite 1,BCHR%(0,1),BDMGPTN%
58490 DM = MSATP + int( rnd * 10 ) - ARM
58500 if DM < 0 then DM = 0
58510 MSG$ = "@rd#NMは" + str$ ( DM ) + "のダメージを受けた! ▼@wh"
58520 gosub *PUT_MES
58530 gosub *INT_BTLSPR
58540 HP = HP - DM
58550 if HP <= 0 then
58560 ENDS = 1
58570 MSA = 2
58580 PT = 1
58600 ENDCOM = 1
58610 MSG$ = DEAD_MES$
58620 gosub *PUT_MES
58630 endif
58640 gosub *USE_HPMP
58650 endif
58660 endif
58680 '
58700 '/* スプライトパターン変更
58710 if CMDN$ = "CHGSPT" then
58720 CHR = val( mid$( CMDL$ , 8 , 3 ) )
58730 PTN = val( mid$( CMDL$ , 12 , 3 ) )
58740 sprite 1,CHR,PTN
58750 endif
58760 '
58800 '/* パッド入力による分岐 { PADDIV 010 034 056 , 0 }
58810 if CMDN$ = "PADDIV" then
58820 A = val( mid$( CMDL$ , 8 , 3 ) )
58830 B = val( mid$( CMDL$ , 12 , 3 ) )
58840 R = val( mid$( CMDL$ , 16 , 3 ) )
58850 gosub *INP_PAD
58860 while PT = 0
58870 gosub *INP_PAD
58880 wend
58890 gosub *SND_PAD
58900 if PT = 1 then SCP_LINE = A - 1
58910 if PT = 2 then SCP_LINE = B - 1
58920 if PT = 4 then SCP_LINE = R - 1
58940 endif
58950 '
59000 '/* ステータス設定
59010 if CMDN$ = "WPNSET" then
59020 WPN = val( mid$( CMDL$ , 8 , 1 ) )
59030 if WPN > 8 or WPN < 1 then WPN = 1
59040 else if CMDN$ = "ARMSET" then
59050 ARM = val( mid$( CMDL$ , 8 , 1 ) )
59060 if ARM > 8 or ARM < 1 then ARM = 1
59070 else if CMDN$ = "SLDSET" then
59080 SLD = val( mid$( CMDL$ , 8 , 1 ) )
59090 if SLD > 8 or SLD < 1 then SLD = 1
59100 endif
59110 '
59200 '/* スプライト表示/非表示 */
59210 if CMDN$ = "CHROFF" then
59220 J = 8
59230 SLOOP = 1
59240 while SLOOP = 1
59250 CR = val ( mid$( CMDL$ , J , 3 ) )
59260 if CR = 0 and J = 8 then gosub *CHR_OFF
59270 if CR = 0 and J => 12 then SLOOP = 0
59280 if CR <> 0 then sprite 0,CR,0 : gosub *OUT_CHR
59290 J = J + 4
59300 wend
59310 else if CMDN$ = "CHRON_" or CMDN$ = "CHR_ON" then
59320 J = 8
59330 SLOOP = 1
59340 while SLOOP = 1
59350 CR = val ( mid$( CMDL$ , J , 3 ) )
59360 if CR = 0 and J = 8 then gosub *CHR_ON
59370 if CR = 0 and J => 12 then SLOOP = 0
59380 if CR <> 0 then sprite 0,CR,1
59390 J = J + 4
59400 wend
59410 endif
59420 '
59500 '/* キャラクタ移動コマンド { CHRMOV 020 1 , 0 } */
59510 if CMDN$ = "CHRMOV" then
59520 CHRNO = val ( mid$ ( CMDL$ , 8 , 3 ) )
59530 PD = val ( mid$ ( CMDL$ , 12 , 1 ) )
59540 if CHRNO = MCHR%(0,1) then
59550 on PD gosub *S_UP,*S_RIGHT,*S_DOWN,*S_LEFT
59660 gosub *INT_PAD
59670 else
59680 MMVCHR = CHRNO
59690 SPRCLR = 4
59700 on PD gosub *CHR_UP , *CHR_RIGHT , *CHR_DOWN , *CHR_LEFT
59710 endif
59720 endif
59730 '
59740 '/* フィールドキャラクタ設定 { CHRSET 030 FLDCHR.TIF } */
59750 if CMDN$ = "CHRSET" then
59760 SGCN = val ( mid$( CMDL$ , 8 , 1 ) )
59770 CHRNO = val ( mid$( CMDL$ , 10 , 3 ) )
59780 FILE$ = mid$( CMDL$ , 14 , 12 )
59790 load@ sysf$ + FILE$ , (320, 0)
59800 gosub *TOKA
59810 if SGCN < 1 or SGCN > 2 then SGCN = 1
59820 BY = 0
59830 for X = 0 to 7
59840 BX = 320 + X * 16
59850 OFSET = 384 + X * 4 + (SGCN-1) * 32
59860 gosub *SPRSET_1
59870 next X
59880 if EXCHRSET(SGCN) = 0 then
59890 def sprite 1,CHRNO,(0,240),384+(SGCN-1)*32,1,1
59900 EXCHRSET(SGCN) = 1
59910 endif
59920 endif
59930 '
59940 endif
59950 *SERS
59960 if ENDS <> 0 then ENDCOM = 1
59970 on error goto *ERR_END
59980 return
59990 '
60000 '+--==================================================--+
60010 '|○ 恐怖(?)のデータ編集モジュール ○|
60020 '| [ PUTPTN ] [ CHGPTN ] [ LOADFILE ] [ WRITEFILE ] |
60030 '|○[ SetTable ] [ Edit_NormalEvent ] [ TBLSAVE ]○|
60040 '+--==================================================--+
60100 '/* ---<<設置パターン変更>>--- */
60110 *CHGPTN
60120 OFSET = 0
60130 gosub *MBUF_IN
60140 gosub *INT_PAD
60150 gosub *CHR_OFF
60160 if EXCLAS => 2 and GRPBFSET <> 9 then
60170 MJC = 0
60180 TYPE = 1
60190 gosub *FADE_PASTEL
60200 endif
60210 if EXCLAS = 0 or GRPBFSET <> 9 then
60220 for Y = 0 to 11
60230 CY = Y * 16
60240 for X = 0 to 15
60250 CX = X * 16 + 32
60260 put@a ( CX, CY)-( CX + 15, CY + 15),MAP_PTN%,,,,,256*(16*Y+X+1)
60270 next X
60280 next Y
60290 endif
60300 if EXCLAS => 2 and GRPBFSET <> 9 then
60310 gosub *GBUF_IN
60320 GRPBFSET = 9
60330 endif
60340 if EXCLAS => 2 and GRPBFSET = 9 then gosub *GBUF_OUT
60350 MSG$ = "@wh<<Aボタンで決定して下さい>>@th"
60370 gosub *PUT_MES
60380 OLDPTN = PTNCHG
60380 BTSET = 0
60390 while BTSET = 0
60400 if PD = 1 then CHGY = CHGY - 1
60410 if CHGY < 0 then CHGY = 11
60420 if PD = 5 then CHGY = CHGY + 1
60440 if CHGY > 11 then CHGY = 0
60450 if PD = 3 then CHGX = CHGX + 1
60460 if CHGX > 15 then CHGX = 0
60470 if PD = 7 then CHGX = CHGX - 1
60480 if CHGX < 0 then CHGX = 15
60490 BTSET = PT
60510 line (32+CHGX*16,CHGY*16) - (47+CHGX*16,15+CHGY*16),xor,7,bf
60520 gosub *INP_PAD
60530 if PD = 0 then
60540 gosub *BL_HELP
60550 else
60560 wait PADWAIT
60570 endif
60580 line (32+CHGX*16,CHGY*16) - (47+CHGX*16,15+CHGY*16),xor,7,bf
60590 wend
60600 PTNCHG = CHGY * 16 + CHGX + 1
60610 if BTSET = 2 then PTNCHG = OLDPTN
60620 gosub *MBUF_OUT
60650 MSG$ = "@grAボタンでこのパターンが入力されます♪@th"
60660 gosub *PUT_MES
60670 gosub *INT_PAD
60680 wait 20
60690 gosub *CHR_ON
60700 return
60710 '
60750 '/* ---<< バルーンヘルプ >>--- */
60760 *BL_HELP
60770 OLDCHG = CHG
60780 CHG = CHGY * 16 + CHGX + 1
60790 if CHG <= NMPTN then MSG$ = "- 普通のパターンです -"
60800 if CHG <= HVPTN and CHG > NMPTN then MSG$ = "- Reserved -"
60810 if CHG <= HDPTN and CHG > HVPTN then MSG$ = "- Reserved -"
60820 if CHG <= EVPTN and CHG > HDPTN then MSG$ = "- イベントパターンです -"
60830 if CHG <= NIPTN and CHG > EVPTN then MSG$ = "- 不進行パターンです -"
60840 if OLDCHG <> CHG then
60850 MSG$ = MSG$ + "@th"
60860 gosub *PUT_MES
60870 endif
60880 return
60890 '
60900 '/* ---<<マップファイル保存機能>>--- */
60910 *WRITEFILE
60920 MSG$ = "現在ファイル書き込み中です♪@th" : gosub *PUT_MES
60930 FILE$ = stryf$ + "EMAP_" + mid$(str$(ALMAPS),2) + ".BMD"
60940 kill FILE$
60950 save@ FILE$,MAP_DATA%
60960 MSG$ = "無事保存し終わりましたよぉ♪ ▼@th" : gosub *PUT_MES
60970 gosub *INT_PAD
60980 return
60990 '
61000 '/* ---<<パターンを置く>>--- */
61010 *Edit_PutPatern
61020 *PUTPTN
61030 MAP_DATA%(SMAPX,SMAPY) = CHG
61040 X = ( SMAPX - ( MAPX - 1 ) * VWMAPX ) * 16 + 16
61050 Y = ( SMAPY - ( MAPY - 1 ) * VWMAPY ) * 16
61060 put@a ( X, Y) - (X+15,Y+15),MAP_PTN%,,,,,256*MAP_DATA%(SMAPX,SMAPY)
61070 gosub *SND_PAD
61080 return
61090 '
61100 '/* ---<< マップ読み込みルーチン(番号指定可)>>--- */
61110 *LOADFILE
61120 gosub *INT_PAD
61130 BTSET = 0
61140 CM = ALMAPS
61150 while BTSET = 0
61160 if PD = 5 then CM = CM - 1
61170 if CM < 1 then CM = 1
61180 if PD = 1 then CM = CM + 1
61190 if CM > 99 then CM = 99
61200 if PT = 2 then BTSET = 1
61210 MSG$ = "@gr編集Map番号入力:"+str$(CM)+" 番Map ヒ<B決定>フ@th"
61240 gosub *PUT_MES
61250 gosub *INT_PAD
61260 while PD = 0
61270 gosub *INP_PAD
61280 if PT <> 0 or BTSET <> 0 then PD = 99
61310 wend
61320 wend
61330 ALMAPS = CM
61340 gosub *READ_MAP
61350 gosub *FADE_DISPMAP
61360 gosub *INT_PAD
61370 GRPBFSET = 0
61380 return
61390 '
61400 '/* ---<<データテーブル保存機能>>--- */
61410 *TBLSAVE
61420 color 4
61430 print "現在ファイル書き込み中です♪"
61440 FLNO% = 1
61450 FILE$ = stryf$ + "EMAP_" + mid$( str$(ALMAPS),2 ) + ".MTB"
61460 if subset = 0 then KILL FILE$
61470 open FILE$ for output as #FLNO%
61480 write#FLNO% , CDBG , MAPX_MAX , MAPY_MAX
61490 write#FLNO% , MNSON , PTNNUM , BACKNO , BTLPST!
61500 color 3
61510 print "Writing Monster Data Table..."
61520 for I = 1 to 8
61530 write#FLNO% , MSNMD$(I), MSLVD(I), MSMXHPD(I)
61540 write#FLNO% , MSATPD(I), MSDFD(I), CLJD(I)
61550 write#FLNO% , MSEXPD(I), MSGLDD(I), MSTIFD$(I), MSSIZD(I)
61560 next I
61570 color 3
61580 print "Writing Event Data Table..."
61590 write#FLNO% , AMC
61600 for DP = 1 to AMC
61610 write#FLNO%, EVX(DP),EVY(DP),CMND$(DP)
61630 next DP
61730 close #FLNO%
61740 color 4
61750 print "無事保存し終わりましたよぉ♪"
61760 color 7
61770 return
61780 '
61800 '/* ---<<文字色変更>>--- */
61810 *Edit_CHGColor
61820 input "色番号は何ですぅ?...(0-7)...",CL
61830 color CL
61840 return
61850 '
62000 '/* ---<<編集メニュー>>--- */
62010 *EX_MENU
62020 MSG$ = "@gr座標= X" + str$(SMAPX) + "/Y" + str$(SMAPY) + "@th"
62030 gosub *PUT_MES
62040 gosub *CHR_OFF
62050 gosub *EX_WIN
62060 MENULP = 1
62070 while MENULP = 1
62080 if CMDNO => 7 or CMDNO = 0 then CMDNO = 1
62090 line ( 66, 91+CMDNO*13) - (197,103+CMDNO*13),xor,7,bf
62100 gosub *INT_PAD
62110 while PD = 0
62120 gosub *INP_PAD
62140 if PT <> 0 then PD = 99
62150 wait PADWAIT
62160 wend
62170 line ( 66, 91+CMDNO*13) - (197,103+CMDNO*13),xor,7,bf
62180 if PD = 5 then CMDNO = CMDNO + 1
62190 if PD = 1 then CMDNO = CMDNO - 1
62200 if CMDNO <= 0 then CMDNO = 6
62210 if CMDNO => 7 then CMDNO = 1
62220 if PT = 1 then
62230 on CMDNO gosub *CHGPTN , *SetTable , *WRITEFILE , *LOADFILE
62240 if CMDNO = 5 then gosub *SYSMONITOR
62250 if CMDNO = 6 then CMDL$ = "ENDCHK" : gosub *SCP_MAIN
62260 gosub *EX_WIN
62270 if ENDS = 1 then MENULP = 0
62280 else if PT = 2 then
62290 MENULP = 0
62300 endif
62310 wend
62320 MSG$ = ""
62330 gosub *PUT_MES
62340 gosub *FADE_DISPMAP
62350 gosub *INT_PAD
62360 gosub *CHR_ON
62370 return
62380 '
62400 *EX_WIN
62410 pastel 128
62420 for Y = 0 to 89 step 2
62430 line ( 64 , 102 + Y ) - ( 263 , 102 + Y ),pastel,1,b
62440 line ( 64 , 191 - Y ) - ( 263 , 191 - Y ),pastel,1,b
62450 next Y
62460 line ( 64,102) - (263,191),pset,7,b
62470 symbol ( 66,104),"パターン選択 ",S!,S!,7
62480 symbol ( 66,117),"イベント編集 ",S!,S!,7
62490 symbol ( 66,130),"マップ配列保存",S!,S!,7
62500 symbol ( 66,143),"マップ読込 ",S!,S!,7
62510 symbol ( 66,156),"システムモニタ",S!,S!,7
62520 symbol ( 66,169),"EXIT ",S!,S!,7
62530 return
62540 '
62800 '/* ---○デバッグ用システムモニタ○--- */
62810 *SYSMONITOR
62820 gosub *INT_PAD
62830 if EXCLAS => 1 then gosub *MBUF_IN
62840 MJC = 0
62860 gosub *FADE_PASTEL
62870 symbol ( 35, 18),"■システムモニタ■",S!*2,S!,7,,,1
62880 MD$ = str$(SMAPX)+","+str$(SMAPY)+" /"+str$(MAP_DATA%(SMAPX,SMAPY))
62890 SX = 35 : SY = 32 : SYM$ = "@gr" + MD$ : gosub *WRT_SYM
62900 SX = 35 : SY = 46 : SYM$ = "@grマップ画面:" + str$(MAPX)+","+str$(MAPY)
62920 gosub *WRT_SYM
62930 SX = 35 : SY=60 : SYM$="@grマップ番号:" + str$(ALMAPS) : gosub *WRT_SYM
62940 SX = 35 : SY=74 : SYM$="@gr動作モード :" + SMODE$ : gosub *WRT_SYM
62950 PADSET = 4
62960 gosub *WAIT_PAD
62970 if EXCLAS => 1 then gosub *MBUF_OUT else gosub *DISP_MAP
62980 return
62990 '
63000 '/* ---<<データテーブル編集機能>>--- */
63010 *SetTable
63020 sprite off
63030 MJC = 1
63040 TYPE = 1
63050 gosub *FADE_PASTEL
63060 console 0,24,2
63070 color 7,0, 7,4
63080 SUBSET = 0
63090 EDITMENU = 1
63100 while EDITMENU = 1
63110 on error goto *ERR_PRINTEND
63120 print "┌───────ヌ テーブル編集 ネ───────┐"
63130 print "│(V)テーブルデータ一覧 (S)テーブルデータ保存 ┃"
63140 print "│(E)イベント設定編集 (M)モンスター設定編集 ┃"
63150 print "│(D)マップ基礎設定変更 (C)表示色変更 (H)Help ┃"
63160 print "│(A)アドインプログラム (Z)DOSコンソール (X)終了 ┃"
63170 print "│┏━━━━━━━━━━━━━━━━━━━━━┐┃"
63180 print "│┃コマンドをキーボードから入力してください。│┃"
63190 print "└┴━━━━━━━━━━━━━━━━━━━━━┴┛"
63200 gosub *Key_Input
63210 if K$ = "A" or K$ = "a" then gosub *ADDIN_PRO
63220 if K$ = "E" or K$ = "e" then gosub *EVENTED
63230 if K$ = "C" or K$ = "c" then gosub *Edit_CHGColor
63240 if K$ = "D" or K$ = "d" then gosub *CHG_MAPDATASET
63250 if K$ = "M" or K$ = "m" then gosub *MSTBLED
63260 if K$ = "S" or K$ = "s" then gosub *TBLSAVE
63270 if K$ = "V" or K$ = "v" then gosub *Edit_ViewTable
63280 if K$ = "X" or K$ = "x" then EDITMENU = 0
63290 if K$ = "H" or K$ = "h" then
63300 print "○>> (ヘルプ)付属のマニュアルを見てねっ♪ <<○"
63330 else if K$ = "Z" or K$ = "z" then
63340 on error goto *ERR_RESUME
63350 if EXCALS => 1 then gosub *SBUF_IN
63360 console 0,24,0
63370 shell
63380 console 0,24,2
63390 if EXCLAS => 1 then gosub *SBUF_OUT
63400 on error goto *ERR_END
63410 endif
63420 wait 20
63430 wend
63440 on error goto *ERR_END
63450 gosub *SPR_ON
63460 gosub *DRW_WAKU
63470 TPSET = 0
63480 return
63490 '
63500 '/* ---<<モンスターテーブル編集機能>>--- */
63510 *MSTBLED
63520 print "┌───ヌ モンスターテーブル編集 ネ───┐"
63530 print "│モンスターテーブルを書き換えます。 □┃"
63540 print "└━━━━━━━━━━━━━━━━━━━━┛"
63550 MSEDLOOP = 1
63560 while MSEDLOOP = 1
63570 gosub *MSVW
63580 input "何番を書き換えますかぁ?...(0:中止)...",EN
63590 if EN <> 0 then
63600 input "モンスター名...(現在:"+MSNMD$(EN) +")...", MSNMD$(EN)
63610 input "レベル....(現在:"+str$( MSLVD(EN))+")...", MSLVD(EN)
63620 input "最大HP....(現在:"+str$(MSMXHPD(EN))+")...",MSMXHPD(EN)
63630 input "攻撃力....(現在:"+str$( MSATPD(EN))+")...", MSATPD(EN)
63640 input "防御力....(現在:"+str$( MSDFD(EN))+")...", MSDFD(EN)
63650 input "弱点番号..(現在:"+str$( CLJD(EN))+")...", CLJD(EN)
63660 input "経験値....(現在:"+str$( MSEXPD(EN))+")...", MSEXPD(EN)
63670 input "GOLD......(現在:"+str$( MSGLDD(EN))+")...", MSGLDD(EN)
63680 input "TIFファイル...(現在:"+ MSTIFD$(EN) +")...",MSTIFD$(EN)
63690 input "サイズ....(現在:"+str$( MSSIZD(EN))+")...", MSSIZD(EN)
63700 endif
63710 print "まだ編集しますかぁ?...(y/n)..."
63720 gosub *Key_Input
63730 if K$ = "N" or K$ = "n" then MSEDLOOP = 0
63740 wend
63750 return
63760 '
64000 '/* ---<<イベント編集>>--- */
64010 *EVENTED
64020 print "○----<< イベント編集>> ----○"
64030 EVEDLOOP = 1
64040 while EVEDLOOP = 1
64050 gosub *EVVW
64060 input "何番のデータを書き換えますか?...(0:中止)...",EVNO
64070 if EVNO <> 0 then
64080 if EVNO > AMC then
64090 print "データ登録数増やしてもいいんですね?...(y/n)..."
64100 gosub *Key_Input
64110 if K$ = "y" or K$ = "Y" then
64120 TMM$ = "最大イベント登録数は"
64130 print TMM$ + str$(AMC) + "から" + str$(EVNO) + "になります."
64140 AMC = EVNO
64150 else
64160 print "それじゃその番号には登録できないよぉ♪"
64170 endif
64180 else
64190 E = EVNO
64200 SUBLOOP = 1
64210 while SUBLOOP = 1
64220 print "どの座標に登録しますか?..(1:現設定 2:カーソル 3:新規)...";
64230 gosub *Key_Input : print K$
64240 if K$ = "2" then EVX(E) = SMAPX : EVY(E) = SMAPY
64250 if K$ = "3" then
64260 input "X位置..(現在:"+ str$( EVX(E) ) + ")...", EVX(E)
64270 input "Y位置..(現在:"+ str$( EVY(E) ) + ")...", EVY(E)
64280 endif
64290 input "コマンド...(現在:"+ CMND$(E) + ")...",CMND$(E)
64300 print " No. X Y Command-Line------"
64310 print using " ##:###:###:";E;EVX(E);EVY(E);
64320 print using "& &";CMND$(E)
64330 print "これでよろしいですか?...(y/n)..."
64340 gosub *Key_Input
64350 if K$ = "Y" or K$ = "y" then SUBLOOP = 0
64360 wend
64370 endif
64380 endif
64390 print "まだ他のデータを編集しますか?...(y/n)..."
64400 gosub *Key_Input
64410 if K$ = "N" or K$ = "n" then EVEDLOOP = 0
64420 wend
64430 return
64440 '
64600 '/* ---<<イベント表示>>--- */
64610 *EVVW
64620 print "ネイベントデータを表示します.
64630 print " No. X Y Command-Line------"
64640 for I = 1 to AMC
64650 print using " ##:###:###:"; I; EVX(I); EVY(I);
64660 print using "& &"; CMND$(I)
64670 next I
64680 print "合計で ";AMC;"個のイベントデータが設定されています。"
64690 print "<< 何かキーを押して下さい >>"
64700 gosub *Key_Input
64710 return
64720 '
64800 '/* ---<<モンスターテーブル表示>>--- */
64810 *MSVW
64820 print "ネモンスターデータを表示します.
64830 print " No,モンスター名,Lv,HP,AT,DF,CJ,EP,GD,TIF---------------"
64840 for I = 1 to 8
64850 print using " #:& &:##:"; I ;MSNMD$(I) ;
64860 print using "##:#####:###:" ;MSLVD(I);MSMXHPD(I) ;MSATPD(I);
64870 print using "###:#:####:####:" ;MSDFD(I);CLJD(I);MSEXPD(I);MSGLDD(I);
64880 print using "& &:#" ;MSTIFD$(I) ;MSSIZD(I)
64890 next I
64900 print "<< 何かキーを押して下さい >>"
64910 gosub *Key_Input
64920 return
64930 '
65000 '/* ---<<データテーブル表示機能>>--- */
65010 *Edit_ViewTable
65020 print "┌──────ヌ データテーブル一覧 ネ───────┐"
65030 print "│モンスターテーブル・イベントテーブルを表示します。┃"
65040 print "└━━━━━━━━━━━━━━━━━━━━━━━━━┛"
65050 gosub *MSVW
65060 gosub *EVVW
65080 return
65090 '
65100 '*/ ---○マップ設定変更○--- */
65110 *CHG_MAPDATASET
65120 print "┌──────ヌ マップ基礎設定変更 ネ───────┐"
65130 print "│マップデータファイルの基礎設定を変更します。 ┃"
65140 print "└━━━━━━━━━━━━━━━━━━━━━━━━━┛"
65150 input "CD-BGM番号..............(現在:"+str$(CDBG) +")...",CDBG
65160 input "モンスター出現( 0=OFF/1=ON )..(現在:"+str$(MNSON) +")...",MNSON
65170 input "パターンファイル番号( 0-7 )...(現在:"+str$(PTNNUM)+")...",PTNNUM
65180 input "戦闘時背景TIF番号( 0-7 )...(現在:"+str$(BACKNO)+")...",BACKNO
65190 if MNSON = 1 then
65200 input "戦闘が起こる確率......(現在:"+str$(BTLPST!)+")...",BTLPST!
65210 else
65220 BTLPST! = 0
65230 endif
65240 return
65250 '
65400 '*/ ---○アドインプログラム○--- */
65410 *ADDIN_PRO
65420 print "ネアドインプログラムは設定されていません."
65430 return
65440 '